Exception: Monri::Errors::HttpRequestError
- Inherits:
-
StandardError
- Object
- StandardError
- Monri::Errors::HttpRequestError
- Defined in:
- lib/monri/errors.rb
Instance Attribute Summary collapse
- #body ⇒ String, NilClass readonly
- #code ⇒ Integer readonly
- #headers ⇒ Hash readonly
Instance Method Summary collapse
-
#initialize(message, options) ⇒ HttpRequestError
constructor
A new instance of HttpRequestError.
Constructor Details
#initialize(message, options) ⇒ HttpRequestError
Returns a new instance of HttpRequestError.
21 22 23 24 25 26 |
# File 'lib/monri/errors.rb', line 21 def initialize(, ) super() @code = .delete(:code) || 500 @body = .delete(:body) @headers = .delete(:headers) || {} end |
Instance Attribute Details
#body ⇒ String, NilClass (readonly)
14 15 16 |
# File 'lib/monri/errors.rb', line 14 def body @body end |
#code ⇒ Integer (readonly)
11 12 13 |
# File 'lib/monri/errors.rb', line 11 def code @code end |
#headers ⇒ Hash (readonly)
17 18 19 |
# File 'lib/monri/errors.rb', line 17 def headers @headers end |