server: Convert all non-status errors to codes.Unknown (#1881)

- convertCode utilized errors that were not allowed by the library per 9d0bc30edb/doc/statuscodes.md
- Relevant issue: #1672
This commit is contained in:
Jean de Klerk
2018-03-08 13:46:26 -08:00
committed by dfawley
parent efcc755fd5
commit 9aba04495f
5 changed files with 9 additions and 62 deletions

View File

@ -36,7 +36,10 @@ import (
)
// StreamHandler defines the handler called by gRPC server to complete the
// execution of a streaming RPC.
// execution of a streaming RPC. If a StreamHandler returns an error, it
// should be produced by the status package, or else gRPC will use
// codes.Unknown as the status code and err.Error() as the status message
// of the RPC.
type StreamHandler func(srv interface{}, stream ServerStream) error
// StreamDesc represents a streaming RPC service's method specification.