-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move error name to BaseResponseError class
The "friendly" name of the error that's sent as a query param (?error=friendly_name) on error responses is, by default, the name of the error class, formatted to snake case. This change moves this definition to a method in the base class `BaseResponseError#name_for_response` This way, if ever needed, the `name_for_response` can be overridden by doing: ```rb SomeName = Class.new(BaseResponseError) do def self.name_for_response :some_other_name end end ```
- Loading branch information
1 parent
8c513db
commit bdf3d50
Showing
3 changed files
with
11 additions
and
8 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