Class: Rails::FmRest::Railtie
- Inherits:
-
Railtie
- Object
- Railtie
- Rails::FmRest::Railtie
- Defined in:
- lib/fmrest/railtie.rb
Class Method Summary collapse
-
.rescue_responses ⇒ Object
Mapping of rescued exceptions to HTTP responses.
Class Method Details
.rescue_responses ⇒ Object
Mapping of rescued exceptions to HTTP responses
@ return [Hash] rescued responses
14 15 16 17 18 19 20 21 |
# File 'lib/fmrest/railtie.rb', line 14 def self.rescue_responses { "FmRest::APIError::RecordMissingError" => :not_found, "FmRest::APIError::NoMatchingRecordsError" => :not_found, "FmRest::APIError::ValidationError" => :unprocessable_entity, "FmRest::Spyke::ValidationError" => :unprocessable_entity, } end |