pub enum RegistrationError {
InvalidRedirectUri(String),
InvalidClientMetadata(String),
Auth(AuthError),
}Expand description
RFC 7591 §3.2.2 requires /register errors to be reported as HTTP 400
with a {"error": ..., "error_description": ...} body using one of the
RFC’s defined error codes — unlike the generic AuthError ->
IntoResponse impl in error.rs, which returns 422 with a
{"kind", "message"} body. This is register_client’s dedicated error
type, mirroring TokenEndpointError in token.rs for the /token
endpoint (RFC 6749 §5.2).
Variants§
InvalidRedirectUri(String)
A redirect_uris entry failed validation (RFC 7591 §3.2.2).
InvalidClientMetadata(String)
application_type (or another client-metadata field) failed
validation.
Auth(AuthError)
Any other failure surfaced from shared auth infrastructure (rate
limiting, storage). Status codes are preserved from AuthError’s own
semantics, but the response body still uses the RFC 7591
error/error_description shape for consistency within this
endpoint’s responses.