# continue execution
return HTTPNotFound("The object does not exist")
// do something
// do something with the error message
Your render is not considered if you do not return a value for renderer but return a response or exception - so do not expect json on the output unless your error handler supports that.
You can do something like this instead:
And then you can retrieve the JSON in your error handler and use angular.fromJson() to read it.