Errors¶
Error types that methods in the FaunaDB client throw.
-
exception
faunadb.errors.
BadRequest
(request_result)¶ HTTP 400 error.
-
class
faunadb.errors.
ErrorData
(code, description, position, failures)¶ Data for one error returned by the server.
-
__init__
(code, description, position, failures)¶
-
description
= None¶ Error description.
-
failures
= None¶ List of all
Failure
objects returned by the server. None unless code == “validation failed”.
-
position
= None¶ Position of the error in a query. May be None.
-
-
class
faunadb.errors.
Failure
(code, description, field)¶ Part of the
failures
of anErrorData
. See theInvalid Data
section of the docs.-
__init__
(code, description, field)¶
-
code
= None¶ Failure code.
-
description
= None¶ Failure description.
-
field
= None¶ Field of the failure in the instance.
-
-
exception
faunadb.errors.
FaunaError
(description, request_result)¶ Error returned by the FaunaDB server. For documentation of error types, see the docs.
-
__init__
(description, request_result)¶
-
request_result
= None¶ RequestResult
for the request that caused this error.
-
-
exception
faunadb.errors.
InternalError
(request_result)¶ HTTP 500 error.
-
exception
faunadb.errors.
NotFound
(request_result)¶ HTTP 404 error.
-
exception
faunadb.errors.
PermissionDenied
(request_result)¶ HTTP 403 error.
HTTP 401 error.
HTTP 503 error.
-
exception
faunadb.errors.
UnexpectedError
(description, request_result)¶ Error for when the server returns an unexpected kind of response.