Skip to content

angee.integrate.oauth.errors

OAuth/OIDC flow errors surfaced to callers as stable codes.

The shared failure vocabulary for the connection protocol. OAuth owns the base codes (state, token exchange); the OIDC layer reuses the same :class:OAuthFlowError for its id-token/userinfo failures, and the login addon adds its own identity-resolution codes on top.

OAuthFlowError

python
class OAuthFlowError(Exception)

Exception carrying a stable OAuth/OIDC failure code and HTTP status.

provider_message

python
@property
def provider_message() -> str

Return a safe human message decoded from the provider error body, or "".

The error owns the shape of its own body: only known scalar fields (error_description/message/detail, or a nested error object) are surfaced, never an arbitrary response body.

public_message

python
@property
def public_message() -> str

Return the safe message callers can show to users.

Released under the AGPL-3.0 License.