Prev |  | Next

## 20.2. Neo4j Status Codes

The transactional endpoint may in any response include zero or more status codes, indicating issues or information for the client. Each status code follows the same format: "Neo.[Classification].[Category].[Title]". The fact that a status code is returned by the server does always mean there is a fatal error. Status codes can also indicate transient problems that may go away if you retry the request.

What the effect of the status code is can be determined by its classification.

| Note
This is not the same thing as HTTP status codes. Neo4j Status Codes are returned in the response body, at the very end of the response.

### 20.2.1. Classifications

Classification | Description | Effect on transaction
--- | --- | ---
`ClientError` | The Client sent a bad request - changing the request might yield a successful outcome. | None
`DatabaseError` | The database failed to service the request. | Rollback
`TransientError` | The database cannot service the request right now, retrying later might yield a successful outcome. | None

### 20.2.2. Status codes

This is a complete list of all status codes Neo4j may return, and what they mean.

Status Code | Description
--- | ---
`Neo.ClientError.General.ReadOnly` | This is a read only database, writing or modifying the database is not allowed.
`Neo.ClientError.Request.Invalid` | The client provided an invalid request.
`Neo.ClientError.Request.InvalidFormat` | The client provided a request that was missing required fields, or had values that are not allowed.
`Neo.ClientError.Schema.ConstraintAlreadyExists` | Unable to perform operation because it would clash with a pre-existing constraint.
`Neo.ClientError.Schema.ConstraintVerificationFailure` | Unable to create constraint because data that exists in the database violates it.
`Neo.ClientError.Schema.ConstraintViolation` | A constraint imposed by the database was violated.
`Neo.ClientError.Schema.IllegalTokenName` | A token name, such as a label, relationship type or property key, used is not valid. Tokens cannot be empty strings and cannot be null.
`Neo.ClientError.Schema.IndexAlreadyExists` | Unable to perform operation because it would clash with a pre-existing index.
`Neo.ClientError.Schema.IndexBelongsToConstraint` | A requested operation can not be performed on the specified index because the index is part of a constraint. If you want to drop the index, for instance, you must drop the constraint.
`Neo.ClientError.Schema.LabelLimitReached` | The maximum number of labels supported has been reached, no more labels can be created.
`Neo.ClientError.Schema.NoSuchConstraint` | The request (directly or indirectly) referred to a constraint that does not exist.
`Neo.ClientError.Schema.NoSuchIndex` | The request (directly or indirectly) referred to an index that does not exist.
`Neo.ClientError.Statement.ArithmeticError` | Invalid use of arithmetic, such as dividing by zero.
`Neo.ClientError.Statement.ConstraintViolation` | A constraint imposed by the statement is violated by the data in the database.
`Neo.ClientError.Statement.EntityNotFound` | The statement is directly referring to an entity that does not exist.
`Neo.ClientError.Statement.InvalidSemantics` | The statement is syntactically valid, but expresses something that the database cannot do.
`Neo.ClientError.Statement.InvalidSyntax` | The statement contains invalid or unsupported syntax.
`Neo.ClientError.Statement.InvalidType` | The statement is attempting to perform operations on values with types that are not supported by the operation.
`Neo.ClientError.Statement.NoSuchProperty` | The statement is referring to a property that does not exist.
`Neo.ClientError.Statement.ParameterMissing` | The statement is referring to a parameter that was not provided in the request.
`Neo.ClientError.Transaction.ConcurrentRequest` | There were concurrent requests accessing the same transaction, which is not allowed.
`Neo.ClientError.Transaction.EventHandlerThrewException` | A transaction event handler threw an exception. The transaction will be rolled back.
`Neo.ClientError.Transaction.InvalidType` | The transaction is of the wrong type to service the request. For instance, a transaction that has had schema modifications performed in it cannot be used to subsequently perform data operations, and vice versa.
`Neo.ClientError.Transaction.UnknownId` | The request referred to a transaction that does not exist.
`Neo.DatabaseError.General.CorruptSchemaRule` | A malformed schema rule was encountered. Please contact your support representative.
`Neo.DatabaseError.General.FailedIndex` | The request (directly or indirectly) referred to an index that is in a failed state. The index needs to be dropped and recreated manually.
`Neo.DatabaseError.General.UnknownFailure` | An unknown failure occurred.
`Neo.DatabaseError.Schema.ConstraintCreationFailure` | Creating a requested constraint failed.
`Neo.DatabaseError.Schema.ConstraintDropFailure` | The database failed to drop a requested constraint.
`Neo.DatabaseError.Schema.IndexCreationFailure` | Failed to create an index.
`Neo.DatabaseError.Schema.IndexDropFailure` | The database failed to drop a requested index.
`Neo.DatabaseError.Schema.NoSuchLabel` | The request accessed a label that did not exist.
`Neo.DatabaseError.Schema.NoSuchPropertyKey` | The request accessed a property that does not exist.
`Neo.DatabaseError.Schema.NoSuchRelationshipType` | The request accessed a relationship type that does not exist.
`Neo.DatabaseError.Schema.NoSuchSchemaRule` | The request referred to a schema rule that does not exist.
`Neo.DatabaseError.Statement.ExecutionFailure` | The database was unable to execute the statement.
`Neo.DatabaseError.Transaction.CouldNotBegin` | The database was unable to start the transaction.
`Neo.DatabaseError.Transaction.CouldNotCommit` | The database was unable to commit the transaction.
`Neo.DatabaseError.Transaction.CouldNotRollback` | The database was unable to roll back the transaction.
`Neo.DatabaseError.Transaction.ReleaseLocksFailed` | The transaction was unable to release one or more of its locks.
`Neo.TransientError.Network.UnknownFailure` | An unknown network failure occurred, a retry may resolve the issue.
`Neo.TransientError.Transaction.DeadlockDetected` | This transaction, and at least one more transaction, has acquired locks in a way that it will wait indefinitely, and the database has aborted it. Retrying this transaction will most likely be successful.

Copyright © 2014 Neo Technology

Prev | Up | Next
| Home |