Exception: Served::Resource::ResponseInvalid
- Inherits:
-
Error
- Object
- StandardError
- Base::ServiceError
- Error
- Served::Resource::ResponseInvalid
- Defined in:
- lib/served/resource/response_invalid.rb
Instance Method Summary collapse
-
#initialize(resource, original_error = false) ⇒ ResponseInvalid
constructor
A new instance of ResponseInvalid.
Constructor Details
#initialize(resource, original_error = false) ⇒ ResponseInvalid
Returns a new instance of ResponseInvalid.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/served/resource/response_invalid.rb', line 4 def initialize(resource, original_error = false) if original_error super "The resource '#{resource.name}' failed to serialize the " \ "response with message: #{original_error.}'" return end super "The resource '#{resource.name}' returned a response, but the result " \ "of serialization was `nil`" end |