HTTPException
class¶
This is the reference for the main object HTTPException
that contains all the parameters,
attributes and functions.
esmerald.HTTPException
¶
HTTPException(*args, detail=None, status_code=None, headers=None, **extra)
Bases: HTTPException
, EsmeraldAPIException
Base of all Esmerald
execeptions.
Tip
For an implementation of a custom exception that you need
to be thrown by Esmerald, it is advised to subclass HTTPException
.
PARAMETER | DESCRIPTION |
---|---|
*args
|
The args passed to the exception.
TYPE:
|
detail
|
A string text with the details of the error being thrown.
TYPE:
|
status_code
|
An integer with the status code to be raised.
TYPE:
|
headers
|
Any python dictionary containing headers.
TYPE:
|
**extra
|
Any extra information used by the exception.
TYPE:
|
Source code in esmerald/exceptions.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
|