Exception: Fizzy::NetworkError
- Defined in:
- lib/fizzy/errors.rb
Overview
Raised when there’s a network error (connection, timeout, DNS).
Instance Attribute Summary
Attributes inherited from Error
#cause, #code, #hint, #http_status, #request_id, #retry_after, #retryable
Instance Method Summary collapse
-
#initialize(message = "Network error", cause: nil) ⇒ NetworkError
constructor
A new instance of NetworkError.
Methods inherited from Error
#exit_code, exit_code_for, #retryable?
Constructor Details
#initialize(message = "Network error", cause: nil) ⇒ NetworkError
Returns a new instance of NetworkError.
179 180 181 182 183 184 185 186 187 |
# File 'lib/fizzy/errors.rb', line 179 def initialize( = "Network error", cause: nil) super( code: ErrorCode::NETWORK, message: , hint: cause&. || "Check your network connection", retryable: true, cause: cause ) end |