exceptions¶
BadRequest
¶
400 Bad Request
Source code in optimade/server/exceptions.py
44 45 46 47 48 |
|
Forbidden
¶
403 Forbidden
Source code in optimade/server/exceptions.py
58 59 60 61 62 |
|
HTTPException
¶
This abstract class makes it easier to subclass FastAPI's HTTPException with new status codes.
It can also be useful when testing requires a string representation of an exception that contains the HTTPException detail string, rather than the standard Python exception message.
Attributes:
Name | Type | Description |
---|---|---|
status_code |
int
|
The HTTP status code accompanying this exception. |
title |
str
|
A descriptive title for this exception. |
Source code in optimade/server/exceptions.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
InternalServerError
¶
500 Internal Server Error
Source code in optimade/server/exceptions.py
79 80 81 82 83 |
|
NotFound
¶
404 Not Found
Source code in optimade/server/exceptions.py
65 66 67 68 69 |
|
NotImplementedResponse
¶
501 Not Implemented
Source code in optimade/server/exceptions.py
86 87 88 89 90 |
|
UnprocessableEntity
¶
422 Unprocessable Entity
Source code in optimade/server/exceptions.py
72 73 74 75 76 |
|
VersionNotSupported
¶
553 Version Not Supported
Source code in optimade/server/exceptions.py
51 52 53 54 55 |
|