teal.web_listener.exceptions – Exceptions for the TeaL web listener#

exception teal.web_listener.exceptions.EmptyStateException#

Bases: WebListenerCallbackException

A callback state was found, but was empty.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.InvalidCIBAAuthentication#

Bases: WebListenerCIBAException

An invalid authentication was provided with the ping/push callback.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.InvalidCIBAPayload#

Bases: WebListenerCIBAException

An invalid payload was provided with the ping/push callback.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.MissingFullURLException#

Bases: WebListenerCallbackException

The full URL was not provided.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.MissingStateException#

Bases: WebListenerCallbackException

The state could not be found in a given URL.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.NoRedirectionException(*, background: BackgroundTasks | None = None)#

Bases: WebListenerCallbackException

No redirection is implied by the callback state.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.PowensWebhookClientException(*, status_code: int | None = None, detail: str)#

Bases: WebListenerException

A Powens webhook validation has failed.

Parameters:

status_code – The status code to use to signal the error. If None, the exception will be reported using the HTTP 400 status code.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.UnknownStateException#

Bases: WebListenerCallbackException

A callback state was found, but not in the database.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.WebListenerCIBAException(detail: str, /, *, status_code: int | None = None, background: BackgroundTasks | None = None)#

Bases: WebListenerException

OpenID CIBA Ping/Push related exceptions raised by the Web Listener.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.WebListenerCallbackException(detail: str, /, *, status_code: int | None = None, background: BackgroundTasks | None = None)#

Bases: WebListenerException

Callback-related exceptions raised by the Web Listener.

background: BackgroundTasks | None#
detail: str#
status_code: int#
exception teal.web_listener.exceptions.WebListenerException(*, status_code: int | None = None, detail: str = '', background: BackgroundTasks | None = None)#

Bases: Exception

Exception raised by routes and utilities from the Web Listener.

Parameters:
  • status_code – The status code to raise.

  • detail – The detail.

  • background – The background task to include with the response.

background: BackgroundTasks | None#
detail: str#
status_code: int#