Exception: Grape::Exceptions::InvalidMessageBody

Inherits:
Base
  • Object
show all
Defined in:
lib/grape/exceptions/invalid_message_body.rb

Constant Summary

Constants inherited from Base

Base::BASE_ATTRIBUTES_KEY, Base::BASE_MESSAGES_KEY, Base::FALLBACK_LOCALE

Instance Attribute Summary

Attributes inherited from Base

#headers, #message, #status

Instance Method Summary collapse

Methods inherited from Base

#[]

Constructor Details

#initialize(body_format) ⇒ InvalidMessageBody

Returns a new instance of InvalidMessageBody


5
6
7
# File 'lib/grape/exceptions/invalid_message_body.rb', line 5

def initialize(body_format)
  super(message: compose_message(:invalid_message_body, body_format: body_format), status: 400)
end