Exception: Safire::Errors::RegistrationError
- Inherits:
-
OAuthError
- Object
- StandardError
- Error
- OAuthError
- Safire::Errors::RegistrationError
- Includes:
- ReceivesFields
- Defined in:
- lib/safire/errors.rb
Overview
Raised when Dynamic Client Registration (RFC 7591) fails.
Two usage paths:
-
HTTP failure: provide
status,error_code, and/orerror_description -
Structural failure (missing
client_idin a 2xx response): providereceived_fields
Instance Attribute Summary collapse
-
#received_fields ⇒ Array<String>?
readonly
Field names present in a response missing
client_id(no values logged).
Attributes inherited from OAuthError
#error_code, #error_description, #status
Method Summary
Methods included from ReceivesFields
Methods inherited from OAuthError
Instance Attribute Details
#received_fields ⇒ Array<String>? (readonly)
Returns field names present in a response missing client_id (no values logged).
209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/safire/errors.rb', line 209 class RegistrationError < OAuthError include ReceivesFields private def operation_label = 'Client registration failed' def return super unless @received_fields&.any? "Registration response missing client_id; received fields: #{@received_fields.join(', ')}" end end |