Friday, February 7, 2014

Error Handling

I am purposefully throwing errors to see results of bad / fictitious / url manipulated requests and I see when a User is logged in and the action is prefixed the error also gets prefixed.

 

[MissingActionException] Action ErrorsController::manage_error404() could not be found.

 

I do not want to have errors for all 4 different routed prefixes, so how to go about removing the prefix if exists and simply call the error404 / error5xx or what not.

If the error is 404 then return error404() from error controller regardless of the prefix or not.

 

Thanks,

 

Dave

No comments: