-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Current error handling scheme is inconvenient and requires additional wrapping on go-tarantool package's client
For example - it is not possible to call errors.Is(err, context.Canceled) because of the current implementation.
My suggestion is to add Unwrap() error method for each error struct in https://github.com/viciious/go-tarantool/blob/master/error.go#L29 so it would be possible to compare go-tarantool errors with golang built-in errors by using errors.As or errors.Is functions
More information about Unwrap interface could be found here:
https://github.com/golang/go/blob/master/src/errors/errors.go#L12
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels