Exception: PayuPl::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/payu_pl/errors.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, http_status:, correlation_id: nil, raw_body: nil, parsed_body: nil) ⇒ ResponseError

Returns a new instance of ResponseError.



28
29
30
31
32
33
34
# File 'lib/payu_pl/errors.rb', line 28

def initialize(message, http_status:, correlation_id: nil, raw_body: nil, parsed_body: nil)
  super(message)
  @http_status = http_status
  @correlation_id = correlation_id
  @raw_body = raw_body
  @parsed_body = parsed_body
end

Instance Attribute Details

#correlation_id ⇒ Object (readonly)

Returns the value of attribute correlation_id.



26
27
28
# File 'lib/payu_pl/errors.rb', line 26

def correlation_id
  @correlation_id
end

#http_status ⇒ Object (readonly)

Returns the value of attribute http_status.



26
27
28
# File 'lib/payu_pl/errors.rb', line 26

def http_status
  @http_status
end

#parsed_body ⇒ Object (readonly)

Returns the value of attribute parsed_body.



26
27
28
# File 'lib/payu_pl/errors.rb', line 26

def parsed_body
  @parsed_body
end

#raw_body ⇒ Object (readonly)

Returns the value of attribute raw_body.



26
27
28
# File 'lib/payu_pl/errors.rb', line 26

def raw_body
  @raw_body
end