Skip to content

Conversation

robsdedude
Copy link
Member

Return the first GqlError in the cause chain with the given GQL status.

This method traverses this GQLErorrs's :attr:__cause__ chain, starting with this error itself, and returns the first error that has the given GQL status. If no error matches, :data:None is returned.

Example:

def invalid_syntax(err: GqlError) -> bool:
    return err.find_by_gql_status("42001") is not None

@robsdedude robsdedude force-pushed the feat/gql-error-cause-chain-helper branch 3 times, most recently from 6c0bad6 to a75fad3 Compare July 14, 2025 08:14
Return the first GqlError in the cause chain with the given GQL status.

This method traverses this GQLErorrs's :attr:`__cause__` chain,
starting with this error itself, and returns the first error that has
the given GQL status. If no error matches, :data:`None` is returned.

Example:

```python
def invalid_syntax(err: GqlError) -> bool:
    return err.find_by_gql_status("42001") is not None
```
@robsdedude robsdedude force-pushed the feat/gql-error-cause-chain-helper branch from a75fad3 to 89a66b6 Compare July 14, 2025 08:20
@robsdedude robsdedude marked this pull request as ready for review July 14, 2025 10:32
@robsdedude robsdedude force-pushed the feat/gql-error-cause-chain-helper branch from c0c6f66 to 6b8424a Compare July 15, 2025 09:53
Copy link
Contributor

@MaxAake MaxAake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 ✅

@robsdedude robsdedude merged commit 9d0cec6 into neo4j:6.x Jul 15, 2025
20 checks passed
@robsdedude robsdedude deleted the feat/gql-error-cause-chain-helper branch July 15, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants