You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 functionsMore information about Unwrap interface could be found here:
https://github.com/golang/go/blob/master/src/errors/errors.go#L12
The text was updated successfully, but these errors were encountered: