Open
Description
When using the ReaderClient it is kind of clunky to catch gets that are for non existent keys. For example this is the current matching that I have in place. As far as I can tell that "key not found" message is coming straight from boltdb.
if err != nil {
if status, ok := status.FromError(err); ok && status.Message() == "key not found" {
return nil, nil
}
return nil, fmt.Errorf("topaz.DirectoryClient.GetObject/reader.GetObject: %w", err)
}
If they were promoted to one of the errors in https://github.com/aserto-dev/go-directory/blob/main/pkg/derr/errors.go or other well defined grpc status error that would be great!
Metadata
Metadata
Assignees
Labels
No labels