Exception: HumanError::Errors::ResourcePersistenceError
- Inherits:
-
RequestError
- Object
- RuntimeError
- RequestError
- HumanError::Errors::ResourcePersistenceError
- Includes:
- CrudError
- Defined in:
- lib/human_error/errors/crud_errors/resource_persistence_error.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#errors ⇒ Object
Returns the value of attribute errors.
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
- #developer_details ⇒ Object
- #developer_message ⇒ Object
- #friendly_message ⇒ Object
- #http_status ⇒ Object
Methods included from CrudError
Methods inherited from RequestError
Methods included from HumanError::Error
#customer_support_uri, #developer_documentation_uri, included, #initialize, #to_json, #to_s
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/human_error/errors/crud_errors/resource_persistence_error.rb', line 9 def attributes @attributes end |
#errors ⇒ Object
Returns the value of attribute errors.
9 10 11 |
# File 'lib/human_error/errors/crud_errors/resource_persistence_error.rb', line 9 def errors @errors end |
Instance Method Details
#developer_details ⇒ Object
21 22 23 24 25 26 |
# File 'lib/human_error/errors/crud_errors/resource_persistence_error.rb', line 21 def developer_details { 'errors' => errors, 'attributes' => attributes, } end |
#developer_message ⇒ Object
16 17 18 19 |
# File 'lib/human_error/errors/crud_errors/resource_persistence_error.rb', line 16 def "One or more of the attributes on the #{resource_name} you attempted " \ "to #{action} is invalid." end |
#friendly_message ⇒ Object
28 29 30 |
# File 'lib/human_error/errors/crud_errors/resource_persistence_error.rb', line 28 def "Sorry! We had a problem when tried to #{action} that #{resource_name}." end |
#http_status ⇒ Object
12 13 14 |
# File 'lib/human_error/errors/crud_errors/resource_persistence_error.rb', line 12 def http_status 422 end |