Module errors

Module errors 

Source
Expand description

Error types and handling.

§Structured Error Types for OAuth Operations

Comprehensive error handling for AT Protocol OAuth operations using structured error types with the thiserror library. All errors follow the project convention of prefixed error codes with descriptive messages.

§Error Categories

  • JWTError (jwt-1 to jwt-18): JSON Web Token validation, parsing, and verification errors
  • JWKError (jwk-1 to jwk-7): JSON Web Key conversion, processing, and thumbprint errors
  • OAuthClientError (client-1 to client-14): OAuth client operations and server communication errors
  • ResourceValidationError (resource-1 to resource-2): OAuth protected resource configuration validation errors
  • AuthServerValidationError (auth-server-1 to auth-server-12): OAuth authorization server configuration validation errors
  • DpopError (dpop-1 to dpop-6): DPoP (Demonstration of Proof-of-Possession) operation errors
  • OAuthStorageError (storage-1 to storage-4): OAuth request storage operations including cache lock failures and data access errors

§Error Format

All errors use the standardized format: error-atproto-oauth-{domain}-{number} {message}: {details}

Enums§

AuthServerValidationError
Represents errors that can occur during OAuth authorization server validation.
DpopError
Represents errors that can occur during DPoP (Demonstration of Proof-of-Possession) operations.
JWKError
Error types that can occur when working with JSON Web Keys
JWTError
Error types that can occur when working with JSON Web Tokens
OAuthClientError
Represents errors that can occur during OAuth client operations.
OAuthStorageError
Error types that can occur when working with OAuth request storage operations
ResourceValidationError
Represents errors that can occur during OAuth resource validation.