google / google/trillian

GRPC server errors not wrapped into status

Open
#2,328 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
3.7k
Forks
465
Avg merge
2d 16h
Merged PRs (30d)
5

Description

Trillian `logerver` doesn't always wrap the returned errors into [status](https://pkg.go.dev/google.golang.org/grpc/status). GRPC [automatically](https://github.com/grpc/grpc-go/blob/754ee590a4f386d0910d887f3b8776354042260b/interceptor.go#L52) wraps non-status errors into a status with `code.Unknown` and message `err.Error()`.

This causes a situation where a `context.DeadlineExceeded` error is not labeled as `codes.DeadlineExceeded` [#2327]. Probably there are other cases of inconsistency.

We should make sure all paths in GRPC handlers return wrapped errors.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.