I’m working on a rest application and have a BaseRestHandler all my handlers inherit from. This base handler has an ‘onError’ method implemented to trap errors and return a nicely formatted JSON message letting the client know what happened. What I’m noticing after implementing some logging is that this method is firing twice when I specify the event.renderData with a statusCode argument of 500. If its 200 or not specified it only fires once. Thoughts on why its behaving like this?
`
function onError(event,rc,prc,faultAction,exception){
prc.response.success = false;
writeLog(application=true,text=“onError executed”);
event.renderData(data=prc.response, type=rc.format, statusCode=“500”);
}
`
Thanks in advance.
Brett