Exception: Atum::Core::ApiError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ ApiError

Returns a new instance of ApiError.



10
11
12
13
14
15
16
17
# File 'lib/atum/core/errors.rb', line 10

def initialize(error)
  @error = error
  if @error.key?('documentation_url')
    super("#{@error['message']}, see #{@error['documentation_url']}")
  else
    super("#{@error['message']}")
  end
end

Instance Attribute Details

#errorObject (readonly)

Returns the value of attribute error.



8
9
10
# File 'lib/atum/core/errors.rb', line 8

def error
  @error
end