abort
Raise an :exc:~werkzeug.exceptions.HTTPException for the given status code.
def abort(
code: int | BaseResponse,
args: Any,
kwargs: Any
) - > NoReturn
Raise an :exc:~werkzeug.exceptions.HTTPException for the given status code. If :data:~flask.current_app is available, it will call its :attr:~flask.Flask.aborter object, otherwise it will use :func:werkzeug.exceptions.abort.
Parameters
| Name | Type | Description |
|---|---|---|
| code | `int | BaseResponse` |
| args | Any | Positional arguments passed to the exception constructor. |
| kwargs | Any | Keyword arguments passed to the exception constructor. |
Returns
| Type | Description |
|---|---|
NoReturn | This function does not return as it always raises an HTTPException. |