›Handling Database Errors
3.3 · Lesson
Handling Database Errors
When working with Neo4j, you may encounter various database errors that need to be handled gracefully in your application.
The driver exports a Neo4jException class that is inherited by all exceptions thrown by the database.
AuthenticationException- Raised when authentication fails (incorrect credentials provided)ClientException- Raised when the client-side error occursConnectionReadTimeoutException- Raised when the connection to the database times out (iFull definition for transaction (opens in a new tab)A unit of work that either succeeds in full or leaves no trace. took longer than timeout - 30 seconds, by default)DatabaseException- Raised when there is a problem with the databaseGqlStatusErrorClassification- Raises an error based on GQL status codesRetryableException- Indicates retrying the transaction may succeedServiceUnavailableException- Raised when the database is unavailable (e.g., server is down or not running)TransactionTerminatedException- Indicates that a transaction was terminated for some reason
Join GraphAcademy to keep learning
Create your account to unlock 80+ hours of hands-on Neo4j courses, track your progress, and earn a certificate when you complete the course.
Sign in or register