core/db_exception
library
Exceptions / Errors
-
DbConnectionException
-
The database could not be reached (connection refused, dropped, TLS
failure, timeout). Typically mapped to HTTP
503 Service Unavailable.
-
DbException
-
Typed exceptions thrown by every
dartapi_db driver.
-
ForeignKeyViolationException
-
A FOREIGN KEY constraint was violated — referencing a missing row, or
deleting a row that is still referenced. Typically mapped to HTTP
409 Conflict or 422.
-
QueryException
-
Any other failed statement — SQL syntax errors, unknown columns,
type mismatches, etc.
-
UniqueViolationException
-
A UNIQUE (or PRIMARY KEY) constraint was violated — e.g. inserting a
duplicate email. Typically mapped to HTTP
409 Conflict.