Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,18 @@ Neo4j Execution Errors

.. autoclass:: neo4j.exceptions.Neo4jError

Raised when the Cypher engine returns an error to the client.
There are many possible types of Cypher error, each identified by a unique `status code <https://neo4j.com/docs/status-codes/current/>`_.
.. autoproperty:: message

.. autoproperty:: code

There are many Neo4j status codes, see `status code <https://neo4j.com/docs/status-codes/current/>`_.

.. autoproperty:: classification

.. autoproperty:: category

.. autoproperty:: title


.. autoclass:: neo4j.exceptions.ClientError
:show-inheritance:
Expand Down
3 changes: 3 additions & 0 deletions neo4j/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def _extract_error_class(cls, classification, code):
else:
return cls

def __str__(self):
return "{{code: {code}}} {{message: {message}}}".format(code=self.code, message=self.message)


class ClientError(Neo4jError):
""" The Client sent a bad request - changing the request might yield a successful outcome.
Expand Down