Exception: MaxBotApi::NetworkError

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

Overview

Raised when the HTTP request fails before reaching the API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op:, original_error:) ⇒ NetworkError

Returns a new instance of NetworkError.

Parameters:

  • op (String)

    operation name

  • original_error (Exception)

    original error



49
50
51
52
53
# File 'lib/max_bot_api/errors.rb', line 49

def initialize(op:, original_error:)
  @op = op
  @original_error = original_error
  super("network error during #{op}: #{original_error}")
end

Instance Attribute Details

#opObject (readonly)

Returns the value of attribute op.



45
46
47
# File 'lib/max_bot_api/errors.rb', line 45

def op
  @op
end

#original_errorObject (readonly)

Returns the value of attribute original_error.



45
46
47
# File 'lib/max_bot_api/errors.rb', line 45

def original_error
  @original_error
end