Class: Drillbit::Responses::InvalidApiRequest
- Inherits:
-
Object
- Object
- Drillbit::Responses::InvalidApiRequest
- Defined in:
- lib/drillbit/responses/invalid_api_request.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_api_request.rb', line 9 def self.call(env) error = Drillbit::Errors::InvalidApiRequest.new(accept_header: env['HTTP_ACCEPT']) [ error.http_status, # HTTP Status Code {}, # Response Headers ["{\"errors\": [#{error.to_json}]}"], # Message ] end |