Exception: Creditario::Exceptions::ResourceNotFoundError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/creditario/exceptions.rb

Overview

Excepción arrojada cuando se intenta acceder a algún recurso que no existe en creditar.io

Si se rescata esta excepción, se puede acceder a su atributo server_response para obtener la respuesta de creditar.io

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResourceNotFoundError

:nodoc:



33
34
35
36
# File 'lib/creditario/exceptions.rb', line 33

def initialize(response) # :nodoc:
  @server_response = Oj.load(response.body)
  super(msg = "The resource does not exist")
end

Instance Attribute Details

#server_responseObject (readonly)

Contiene los detalles de la respuesta de creditar.io



31
32
33
# File 'lib/creditario/exceptions.rb', line 31

def server_response
  @server_response
end