Exception: SoapyCake::RequestFailed
- Defined in:
- lib/soapy_cake/error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#request_body ⇒ Object
readonly
Returns the value of attribute request_body.
-
#request_path ⇒ Object
readonly
Returns the value of attribute request_path.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
Instance Method Summary collapse
-
#initialize(message, request_path: nil, request_body: nil, response_body: nil) ⇒ RequestFailed
constructor
A new instance of RequestFailed.
Constructor Details
#initialize(message, request_path: nil, request_body: nil, response_body: nil) ⇒ RequestFailed
Returns a new instance of RequestFailed.
9 10 11 12 13 14 |
# File 'lib/soapy_cake/error.rb', line 9 def initialize(, request_path: nil, request_body: nil, response_body: nil) @request_path = request_path @request_body = request_body&.sub(ENV.fetch('CAKE_API_KEY'), '[redacted]') @response_body = response_body super() end |
Instance Attribute Details
#request_body ⇒ Object (readonly)
Returns the value of attribute request_body.
7 8 9 |
# File 'lib/soapy_cake/error.rb', line 7 def request_body @request_body end |
#request_path ⇒ Object (readonly)
Returns the value of attribute request_path.
7 8 9 |
# File 'lib/soapy_cake/error.rb', line 7 def request_path @request_path end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
7 8 9 |
# File 'lib/soapy_cake/error.rb', line 7 def response_body @response_body end |