Class: Mihari::StatusError
- Inherits:
-
HTTP::Error
- Object
- HTTP::Error
- Mihari::StatusError
- Defined in:
- lib/mihari/errors.rb
Overview
HTTP status error
Instance Attribute Summary collapse
- #body ⇒ String? readonly
- #status_code ⇒ Integer readonly
Instance Method Summary collapse
- #detail ⇒ Object
-
#initialize(msg, status_code, body) ⇒ StatusError
constructor
A new instance of StatusError.
Constructor Details
#initialize(msg, status_code, body) ⇒ StatusError
Returns a new instance of StatusError.
69 70 71 72 73 74 |
# File 'lib/mihari/errors.rb', line 69 def initialize(msg, status_code, body) super(msg) @status_code = status_code @body = body end |
Instance Attribute Details
#body ⇒ String? (readonly)
62 63 64 |
# File 'lib/mihari/errors.rb', line 62 def body @body end |
#status_code ⇒ Integer (readonly)
59 60 61 |
# File 'lib/mihari/errors.rb', line 59 def status_code @status_code end |
Instance Method Details
#detail ⇒ Object
76 77 78 |
# File 'lib/mihari/errors.rb', line 76 def detail {status_code:, body:} end |