gregmac/NServiceMVC — Issue #2: Handle exceptions thrown by controller methods
Author: gregmac
Created: 2012-02-03 04:34:46+00:00
State: open

If exceptions are derived from NServiceMVC.Errors.NsException (TBD), then they are returned as a specified HTTP status code and custom message, in a special error object.

Optionally there is a config callback function to format the error response model.

If another type of exception is thrown, then a generic error (status 500 is raised) and then handled the same way.