Exception: KeycloakAdmin::UnexpectedResponseError
- Defined in:
- lib/keycloak-admin/error.rb
Overview
Raised when a create call succeeds at the HTTP level but answers something other than 201 Created, leaving no Location header to read the new resource's id from.
Instance Attribute Summary collapse
-
#reason_phrase ⇒ Object
readonly
Returns the value of attribute reason_phrase.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, reason_phrase) ⇒ UnexpectedResponseError
constructor
A new instance of UnexpectedResponseError.
Constructor Details
#initialize(status, reason_phrase) ⇒ UnexpectedResponseError
Returns a new instance of UnexpectedResponseError.
56 57 58 59 60 |
# File 'lib/keycloak-admin/error.rb', line 56 def initialize(status, reason_phrase) @status = status @reason_phrase = reason_phrase super("Create method returned status #{reason_phrase} (Code: #{status}); expected status: Created (201)") end |
Instance Attribute Details
#reason_phrase ⇒ Object (readonly)
Returns the value of attribute reason_phrase.
54 55 56 |
# File 'lib/keycloak-admin/error.rb', line 54 def reason_phrase @reason_phrase end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
54 55 56 |
# File 'lib/keycloak-admin/error.rb', line 54 def status @status end |