Exception: KeycloakSdk::AdminError
- Defined in:
- lib/keycloak_sdk/errors.rb
Overview
Admin REST 오류(HTTP status 보존).
Direct Known Subclasses
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
-
.from_status(status, message) ⇒ Object
status → 적절한 하위 예외 인스턴스.
Instance Method Summary collapse
-
#initialize(message = nil, status: nil) ⇒ AdminError
constructor
A new instance of AdminError.
Constructor Details
#initialize(message = nil, status: nil) ⇒ AdminError
Returns a new instance of AdminError.
30 31 32 33 |
# File 'lib/keycloak_sdk/errors.rb', line 30 def initialize( = nil, status: nil) super() @status = status end |
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
28 29 30 |
# File 'lib/keycloak_sdk/errors.rb', line 28 def status @status end |
Class Method Details
.from_status(status, message) ⇒ Object
status → 적절한 하위 예외 인스턴스.
36 37 38 39 40 41 42 43 |
# File 'lib/keycloak_sdk/errors.rb', line 36 def self.from_status(status, ) case status when 404 then NotFoundError.new(, status: status) when 409 then ConflictError.new(, status: status) when 403 then ForbiddenError.new(, status: status) else AdminError.new(, status: status) end end |