Exception: Ovh::Http2sms::NetworkError

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

Overview

Raised when a network error occurs (timeout, connection failure, etc.)

Examples:

raise NetworkError.new("Connection timed out")

Instance Attribute Summary collapse

Attributes inherited from Error

#raw_response, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(message = "Network error occurred", original_error: nil, **options) ⇒ NetworkError

Returns a new instance of NetworkError.



72
73
74
75
# File 'lib/ovh/http2sms/errors.rb', line 72

def initialize(message = "Network error occurred", original_error: nil, **options)
  @original_error = original_error
  super(message, **options)
end

Instance Attribute Details

#original_errorException? (readonly)

Returns Original exception that caused the network error.

Returns:

  • (Exception, nil)

    Original exception that caused the network error



70
71
72
# File 'lib/ovh/http2sms/errors.rb', line 70

def original_error
  @original_error
end