Exception: UserManagementApi::UnprocessableEntityError
- Inherits:
-
StandardError
- Object
- StandardError
- UserManagementApi::UnprocessableEntityError
- Defined in:
- lib/user_management_api/errors.rb
Constant Summary collapse
- DEFAULT_MESSAGE =
'Remote Server responded with 422: Unprocessable Entity. No further details available'
Instance Method Summary collapse
- #errors ⇒ Object
- #formatted_errors ⇒ Object
-
#initialize(faraday_response, parsed_body) ⇒ UnprocessableEntityError
constructor
A new instance of UnprocessableEntityError.
- #response ⇒ Object
Constructor Details
#initialize(faraday_response, parsed_body) ⇒ UnprocessableEntityError
Returns a new instance of UnprocessableEntityError.
16 17 18 19 20 21 |
# File 'lib/user_management_api/errors.rb', line 16 def initialize(faraday_response, parsed_body) @response = faraday_response @body = parsed_body @errors = {} super() end |
Instance Method Details
#errors ⇒ Object
27 28 29 |
# File 'lib/user_management_api/errors.rb', line 27 def errors @errors end |
#formatted_errors ⇒ Object
31 32 33 |
# File 'lib/user_management_api/errors.rb', line 31 def formatted_errors @errors.map { |k, v| "#{k}: #{v}"}.join("\n") end |
#response ⇒ Object
23 24 25 |
# File 'lib/user_management_api/errors.rb', line 23 def response @response end |