Exception: Esplanade::Request::BodyIsNotJson
- Defined in:
- lib/esplanade/request/error.rb
Instance Method Summary collapse
-
#initialize(method:, path:, raw_path:, content_type:, body:) ⇒ BodyIsNotJson
constructor
A new instance of BodyIsNotJson.
- #to_hash ⇒ Object
Constructor Details
#initialize(method:, path:, raw_path:, content_type:, body:) ⇒ BodyIsNotJson
Returns a new instance of BodyIsNotJson.
48 49 50 51 52 53 54 55 56 |
# File 'lib/esplanade/request/error.rb', line 48 def initialize(method:, path:, raw_path:, content_type:, body:) @method = method @path = path @raw_path = raw_path @content_type = content_type @body = body super(to_hash) end |
Instance Method Details
#to_hash ⇒ Object
58 59 60 61 62 63 64 65 66 |
# File 'lib/esplanade/request/error.rb', line 58 def to_hash { method: @method, path: @path, raw_path: @raw_path, content_type: @content_type, body: @body } end |