Exception: JSONAPI::Exceptions::InternalServerError
- Defined in:
- lib/jsonapi/exceptions.rb
Instance Attribute Summary collapse
-
#exception ⇒ Object
Returns the value of attribute exception.
Attributes inherited from Error
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(exception, error_object_overrides = {}) ⇒ InternalServerError
constructor
A new instance of InternalServerError.
Methods inherited from Error
Constructor Details
#initialize(exception, error_object_overrides = {}) ⇒ InternalServerError
Returns a new instance of InternalServerError.
24 25 26 27 |
# File 'lib/jsonapi/exceptions.rb', line 24 def initialize(exception, error_object_overrides = {}) @exception = exception super(error_object_overrides) end |
Instance Attribute Details
#exception ⇒ Object
Returns the value of attribute exception.
22 23 24 |
# File 'lib/jsonapi/exceptions.rb', line 22 def exception @exception end |
Instance Method Details
#errors ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/jsonapi/exceptions.rb', line 29 def errors if JSONAPI.configuration.include_backtraces_in_errors = Hash.new [:exception] = exception. [:backtrace] = exception.backtrace end [create_error_object(code: JSONAPI::INTERNAL_SERVER_ERROR, status: :internal_server_error, title: I18n.t('jsonapi-resources.exceptions.internal_server_error.title', default: 'Internal Server Error'), detail: I18n.t('jsonapi-resources.exceptions.internal_server_error.detail', default: 'Internal Server Error'), meta: )] end |