Skip to content

Missing Unwrap function for internal bolt errors #631

@arxeiss

Description

@arxeiss

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions