-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AP-5524:Let rails handle legal_aid_application RecordNotFound as 404
A question on how we want to handle Not found legal_aid_application objects. Currently we swallow the fact that a legal_aid_application from the id in params is not found, returning nil for it instead. It then handles it being nil by redirecting to the page_not_found page. The rails way would be to let it raise RecordNotFound, which on this branch, will then be handled as a 404 transparently by the ErrorController (via the exceptions_app config). The Advantage of letting rails handle it is that be there is no redirect so the URL remains the same, which is more typical behaviour for not found, and logs will reflect the true cause of the 404. A Disadvantage is I do not know what potential side affects it could have on the rest of the appsince this code underpins virtually every page. But cannot think of any other than that.
- Loading branch information
Showing
5 changed files
with
33 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters