Neptune openCypher exceptions - Amazon Neptune
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Neptune openCypher exceptions

When working with openCypher on Amazon Neptune, a variety of exceptions may occur. Below are common exceptions you may receive, either from the HTTPS endpoint or from the Bolt driver (all exceptions from the Bolt driver are reported as Server State Exceptions):

HTTP code Error message Retriable? Remedy

400

(syntax error, propagated directly from the openCypher parser)

No

Correct query syyntax, then retry.

500

Operation terminated (out of memory)

Yes

Rework the query to add additional filtering criteria to reduce required memory

500

Operation terminated (deadline exceeded)

Yes

Increase the query timeout in the DB cluster parameter group, or retry the request.

500

Operation terminated (cancelled by user)

Yes

Retry the request.

500

Database reset is in progress. Please retry the query after the cluster is available.

Yes

Retry when the reset is completed.

500

Operation failed due to conflicting concurrent operations (please retry). Transactions are currently rolling back.

Yes

Retry using an exponential backoff and retry strategy.

400

(operation name) operation/feature unsupported Exception

No

The specified operation is not supported.

400

openCypher update attempted on a read-only replica

No

Change the target end point to the writer end point.

400

MalformedQueryException (Neptune does not show the internal parser state)

No

Correct query syntax and retry.

400

Cannot delete node, because it still has relationships. To delete this node, you must first delete its relationships.

No

Instead of using MATCH (n) DELETE n use MATCH(n) DETACH DELETE(n)

400

Invalid operation: attempting to remove the last label of a node. A node must have at least one label.

No

Change the query and/or application logic so as not to delete the last node.

500

Max number of request have breached, ConfiguredQueueCapacity={} for connId = {}

Yes

Currently only 8,192 concurrent requests can be processed, regardless of the stack and protocol.

500

Max connection limit breached.

Yes

Only 1000 concurrent Bolt connections per instance are allowed (for HTTP there is no limit).

400

Expected a [one of: Node, Relationship or Path] and got a Literal

No

Check that you are passing the correct argument(s), correct query syntax, and retry.

400

Property value must be a simple literal. Or: Expected Map for Set properties but didn't find one.

No

A SET clause only accepts simple literals, not composite types.

400

Entity found passed for deletion is not found

No

Check that the entity you are trying to delete exists in the database.

400

User does not have access to the database.

No

Check the policy on the IAM role being used.

400

There is no token passed as part of the request

No

A properly signed token must be passed as part of the query request on an IAM enabled cluster.

400

Error message is propagated.

No

Contact Amazon Support with the Request Id.

500

Operation terminated (internal error)

Yes

Contact Amazon Support with the Request Id.