Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Unwrap function for internal bolt errors #631

Open
arxeiss opened this issue Feb 27, 2025 · 1 comment
Open

Missing Unwrap function for internal bolt errors #631

arxeiss opened this issue Feb 27, 2025 · 1 comment

Comments

@arxeiss
Copy link

arxeiss commented Feb 27, 2025

We are using latest driver v5, and when context is cancelled, the error returned from the ExecuteRead or similar function is ConnectionReadCanceled etc. It is in internal package (neo4j/internal/errorutil/bolt.go), so we cannot try to cast to the type.

And because none of the error types below implements Unwrap, the errors.Is() will not succeed either.

  • ConnectionReadTimeout
  • ConnectionWriteTimeout
  • ConnectionReadCanceled
  • ConnectionWriteCanceled

It should be sufficient to implement Unwrap method. No need to expose errors in public API.

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

No branches or pull requests

2 participants
@arxeiss and others