GRPC server errors not wrapped into status
Open
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
Assessment
This issue has not been assessed yet.