Skip to main content

Module error

Module error 

Source
Expand description

The error shape OAuth’s own endpoints use.

crate::error::ApiError is atproto XRPC’s {"error","message"} body. PAR, authorize and token are not XRPC procedures — they are OAuth 2.1 endpoints, and RFC 6749 §5.2 defines their own wire shape: {"error","error_description"}, drawn from a fixed vocabulary (invalid_request, invalid_client, invalid_grant, …). A client library written against the OAuth spec switches on that vocabulary, not on this project’s own error names, so reusing crate::error::ApiError here would answer a spec-defined request with a shape no OAuth client expects.

Structs§

OAuthError
An OAuth-shaped failure: {"error", "error_description"}, per RFC 6749.
OAuthErrorBody 🔒

Enums§

OAuthErrorCode
One of the error values RFC 6749 and its extensions define, restricted to the ones this server’s endpoints actually raise.