Exception: HumanError::Errors::ResourceNotFoundError
Instance Attribute Summary
Attributes included from CrudError
#resource_id, #resource_name
#api_error_documentation_url, #api_version, #code, #knowledgebase_article_id, #knowledgebase_url, #message
Instance Method Summary
collapse
Methods included from CrudError
#initialize
#as_json
#customer_support_uri, #developer_documentation_uri, included, #initialize, #to_json, #to_s
Instance Method Details
#action ⇒ Object
26
27
28
|
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 26
def action
@action || 'access'
end
|
#developer_details ⇒ Object
18
19
20
|
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 18
def developer_details
{ "#{resource_name_underscored}_id" => resource_id }
end
|
#developer_message ⇒ Object
13
14
15
16
|
# 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_message ⇒ Object
22
23
24
|
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 22
def friendly_message
"Sorry! The #{resource_name} you tried to #{action} does not exist."
end
|
#http_status ⇒ Object
9
10
11
|
# File 'lib/human_error/errors/crud_errors/resource_not_found_error.rb', line 9
def http_status
404
end
|