Rename 'getMyRiskIndex' to 'getRiskIndex' and fix error handling code