fastapi_aad_auth.errors¶
fastapi_aad_auth errors.
- exception fastapi_aad_auth.errors.AuthorisationError[source]¶
Not Authorised to access this resource.
- fastapi_aad_auth.errors.base_error_handler(request: starlette.requests.Request, exception: Exception, error_type: str, error_message: str, templates: starlette.templating.Jinja2Templates, template_path: pathlib.Path, context: Optional[Dict] = None, status_code: int = 500) starlette.responses.Response [source]¶
Handle Error as JSON or HTML response depending on request type.
- fastapi_aad_auth.errors.json_error_handler(error_message: str, status_code: int = 500) starlette.responses.JSONResponse [source]¶
Handle error as a JSON.
- fastapi_aad_auth.errors.redirect_error_handler(redirect_path: str, exception: Exception, **kwargs) starlette.responses.RedirectResponse [source]¶
Handle error as a redirect with error info in the query parameters.
- fastapi_aad_auth.errors.ui_error_handler(request: starlette.requests.Request, exception: Exception, error_type: str, error_message: str, templates: starlette.templating.Jinja2Templates, template_path: pathlib.Path, context: Optional[Dict] = None, status_code: int = 500) starlette.responses.Response [source]¶
Return a UI view of the error.