Class: Drillbit::Responses::InvalidRequestBody
- Inherits:
-
Object
- Object
- Drillbit::Responses::InvalidRequestBody
- Defined in:
- lib/drillbit/responses/invalid_request_body.rb
Class Method Summary collapse
-
.call(env) ⇒ Object
rubocop:disable Style/InlineComment.
Class Method Details
.call(env) ⇒ Object
rubocop:disable Style/InlineComment
9 10 11 12 13 14 15 16 17 |
# File 'lib/drillbit/responses/invalid_request_body.rb', line 9 def self.call(env) error = Drillbit::Errors::InvalidRequestBody.new(request_body: env['RACK_INPUT']) [ error.http_status, # HTTP Status Code {}, # Response Headers ["{\"errors\": [#{error.to_json}]}"], # Message ] end |