Exception: Shift::Api::Core::Errors::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/shift/api/core/errors.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, original_exception) ⇒ ApiError

Returns a new instance of ApiError.



11
12
13
14
# File 'lib/shift/api/core/errors.rb', line 11

def initialize(env, original_exception)
  @env = env
  @original_exception = original_exception
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



9
10
11
# File 'lib/shift/api/core/errors.rb', line 9

def env
  @env
end

#original_exceptionObject (readonly)

Returns the value of attribute original_exception.



9
10
11
# File 'lib/shift/api/core/errors.rb', line 9

def original_exception
  @original_exception
end

Class Method Details

.from_jsonapi_client(ex) ⇒ Object



16
17
18
# File 'lib/shift/api/core/errors.rb', line 16

def self.from_jsonapi_client(ex)
  new(ex.env, ex)
end