Exception: JSONAPI::Exceptions::RecordNotFound
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(id) ⇒ RecordNotFound
constructor
A new instance of RecordNotFound.
Constructor Details
#initialize(id) ⇒ RecordNotFound
Returns a new instance of RecordNotFound.
21 22 23 |
# File 'lib/jsonapi/exceptions.rb', line 21 def initialize(id) @id = id end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/jsonapi/exceptions.rb', line 20 def id @id end |
Instance Method Details
#errors ⇒ Object
25 26 27 28 29 30 |
# File 'lib/jsonapi/exceptions.rb', line 25 def errors [JSONAPI::Error.new(code: JSONAPI::RECORD_NOT_FOUND, status: :not_found, title: 'Record not found', detail: "The record identified by #{id} could not be found.")] end |