Closed yordis closed 10 months ago
Added: IsErrorCode to Error struct.
IsErrorCode
Error
Useful when we want to check the error code, I found I use it primarily for the following two (but not limited to) in the write-side,
if err, ok := esdb.FromError(err); !ok { if err.Code() == esdb.ErrorCodeWrongExpectedVersion { } if err.Code() == esdb.ErrorCodeResourceNotFound { } }
@YoEight, any updates here?
Added:
IsErrorCode
toError
struct.Context
Useful when we want to check the error code, I found I use it primarily for the following two (but not limited to) in the write-side,