Exception: Nucleus::Errors::SemanticAdapterRequestError

Inherits:
AdapterError
  • Object
show all
Defined in:
lib/nucleus/core/errors/semantic_adapter_request_error.rb

Overview

The SemanticAdapterRequestError shall be thrown if the user request could not be executed due to logical errors.
Examples for semantic errors are:

- name already used
- quota violations


These errors are clearly to be distinguished from malformed requests.

Instance Attribute Summary

Attributes inherited from AdapterError

#ui_error

Instance Method Summary collapse

Constructor Details

#initialize(message, error_code = nil, ui_error = ErrorMessages::BAD_REQUEST_ENTITY) ⇒ SemanticAdapterRequestError

initialize with default error to be 422



12
13
14
15
16
# File 'lib/nucleus/core/errors/semantic_adapter_request_error.rb', line 12

def initialize(message, error_code = nil, ui_error = ErrorMessages::BAD_REQUEST_ENTITY)
  # allow to customize the error code
  ui_error[:error_code] = error_code unless error_code.nil?
  super(message, ui_error)
end