Exception: HumanError::Errors::ResourceNotFoundError

Inherits:
RequestError
  • Object
show all
Includes:
CrudError
Defined in:
lib/human_error/errors/crud_errors/resource_not_found_error.rb

Instance Attribute Summary

Attributes included from CrudError

#action, #resource_id, #resource_name

Attributes included from HumanError::Error

#api_error_documentation_url, #api_version, #code, #knowledgebase_article_id, #knowledgebase_url, #message

Instance Method Summary collapse

Methods included from CrudError

#initialize

Methods inherited from RequestError

#as_json

Methods included from HumanError::Error

#customer_support_uri, #developer_documentation_uri, included, #initialize, #to_json, #to_s

Instance Method Details

#developer_detailsObject



17
18
19
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 17

def developer_details
  { "#{resource_name}_id" => resource_id }
end

#developer_messageObject



13
14
15
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 13

def developer_message
  "The #{resource_name} you attempted to #{action} for this request is either not authorized for the authenticated user or does not exist."
end

#friendly_messageObject



21
22
23
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 21

def friendly_message
  "Sorry! The #{resource_name} you tried to #{action} does not exist."
end

#http_statusObject



9
10
11
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 9

def http_status
  404
end