-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HYC-1810 - MissingTemplate error for info.json requests (#1048)
* Set formats for error pages * Add render_json_response method from included class which does not appear to be available * HYC-1813 - Send UnknownFormat errors to 404 page, and specify html format for most errors
- Loading branch information
Showing
2 changed files
with
12 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# frozen_string_literal: true | ||
class ErrorsController < ApplicationController | ||
def not_found | ||
render nothing: true, status: 404 | ||
render nothing: true, status: 404, formats: :html | ||
end | ||
|
||
def internal_server_error | ||
render nothing: true, status: 500 | ||
render nothing: true, status: 500, formats: :html | ||
end | ||
end |