fluree.errors¶
Exceptions raised by Fluree.
Every error derives from FlureeError. Where a Python builtin
exception means the same thing, the Fluree error derives from it too, so
except LookupError catches a missing ledger and except ValueError
catches a malformed query.
Module Contents¶
- exception fluree.errors.FlureeError¶
Bases:
ExceptionBase class for all Fluree errors.
statusis the HTTP-style status code the engine assigned the error, orNonewhen the error did not come from the engine.
- exception fluree.errors.InvalidRequestError¶
Bases:
FlureeError,ValueErrorThe query, transaction, or argument is malformed or invalid.
- exception fluree.errors.ShaclViolationError¶
Bases:
InvalidRequestErrorA write that would leave data breaking the ledger’s SHACL shapes.
violationslists each way it would, as the same ValidationResult objects validate reports, so a rejected write is handled like a failed validation.- property violations: list[ValidationResult]¶
Each way the write breaks the shapes, as ValidationResult objects.
- exception fluree.errors.UniqueConstraintError¶
Bases:
InvalidRequestErrorA write that would give two subjects the same value of a property the ledger requires to be unique (
f:enforceUnique).valueis the value as text;graphis the named graph’s IRI, orNonefor the default graph.
- exception fluree.errors.NotFoundError¶
Bases:
FlureeError,LookupErrorA ledger, branch, commit, or graph does not exist.
- exception fluree.errors.PermissionDeniedError¶
Bases:
FlureeError,PermissionErrorPolicy denied the operation.
- exception fluree.errors.ConflictError¶
Bases:
FlureeErrorA concurrent change won; retrying against the new state may succeed.
When a commit lost a race,
expected_tis the ledgertit was built on andhead_tthetanother commit had moved it to; both areNonefor other conflicts.
- exception fluree.errors.QueryTimeoutError¶
Bases:
FlureeError,TimeoutErrorThe operation ran past its time limit.
- exception fluree.errors.ResourceLimitError¶
Bases:
FlureeErrorThe operation exceeded a fuel, memory, or size limit.
- exception fluree.errors.DatabaseInUseError¶
Bases:
FlureeErrorThe database directory is open in another process.
One process opens a directory at a time, and its threads share that connection. To use the same data from several processes, run
fluree serveron the directory and send requests to it.pidis the other process’s id, orNonewhen it could not be read.