Exception: Rexec::NotFoundError

Inherits:
APIError show all
Defined in:
lib/rexec/error.rb

Overview

Resource not found (404).

Instance Attribute Summary collapse

Attributes inherited from APIError

#response_body, #status_code

Instance Method Summary collapse

Constructor Details

#initialize(resource, resource_id) ⇒ NotFoundError

Returns a new instance of NotFoundError.



29
30
31
32
33
# File 'lib/rexec/error.rb', line 29

def initialize(resource, resource_id)
  @resource = resource
  @resource_id = resource_id
  super(404, "#{resource} '#{resource_id}' not found")
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



27
28
29
# File 'lib/rexec/error.rb', line 27

def resource
  @resource
end

#resource_idObject (readonly)

Returns the value of attribute resource_id.



27
28
29
# File 'lib/rexec/error.rb', line 27

def resource_id
  @resource_id
end