Exception: HumanError::Errors::AssociationError
- Inherits:
-
RequestError
- Object
- RuntimeError
- RequestError
- HumanError::Errors::AssociationError
- Includes:
- CrudError
- Defined in:
- lib/human_error/errors/crud_errors/association_error.rb
Instance Attribute Summary collapse
-
#association_id ⇒ Object
Returns the value of attribute association_id.
-
#association_name ⇒ Object
Returns the value of attribute association_name.
-
#attributes ⇒ Object
Returns the value of attribute attributes.
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
#association_id ⇒ Object
Returns the value of attribute association_id.
9 10 11 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 9 def association_id @association_id end |
#association_name ⇒ Object
Returns the value of attribute association_name.
9 10 11 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 9 def association_name @association_name end |
#attributes ⇒ Object
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 9 def attributes @attributes end |
Instance Method Details
#developer_details ⇒ Object
22 23 24 25 26 27 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 22 def developer_details { resource_name => attributes, "#{association_name} id" => association_id, } end |
#developer_message ⇒ Object
17 18 19 20 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 17 def "The #{association_name} that you attempted to associate with " \ "the #{resource_name} was not valid." end |
#friendly_message ⇒ Object
29 30 31 32 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 29 def "Sorry! There was a problem when we tried to set the #{association_name} on " \ "that #{resource_name}." end |
#http_status ⇒ Object
13 14 15 |
# File 'lib/human_error/errors/crud_errors/association_error.rb', line 13 def http_status 422 end |