Class: Pragma::Operation::Response::BadRequest

Inherits:
Pragma::Operation::Response show all
Defined in:
lib/pragma/operation/response/bad_request.rb

Overview

Represents the 400 Bad Request HTTP response.

Constant Summary

Constants inherited from Pragma::Operation::Response

STATUSES

Instance Attribute Summary

Attributes inherited from Pragma::Operation::Response

#entity, #headers, #status

Instance Method Summary collapse

Methods inherited from Pragma::Operation::Response

#decorate_with, #failure?, #success?

Constructor Details

#initialize(entity: Error.new(error_type: :bad_request, error_message: 'This request is malformed.'), headers: {}) ⇒ BadRequest

Returns a new instance of BadRequest.



8
9
10
11
12
13
# File 'lib/pragma/operation/response/bad_request.rb', line 8

def initialize(
  entity: Error.new(error_type: :bad_request, error_message: 'This request is malformed.'),
  headers: {}
)
  super(status: 400, entity: entity, headers: headers)
end