Skip to content

Commit 53a6d9e

Browse files
committed
protovalidate: mention error details in docstrings
Signed-off-by: Akshay Shah <[email protected]>
1 parent 8036513 commit 53a6d9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

interceptors/protovalidate/protovalidate.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
)
1616

1717
// UnaryServerInterceptor returns a new unary server interceptor that validates incoming messages.
18+
// If the request is invalid, clients may access a structured representation of the validation failure as an error detail.
1819
func UnaryServerInterceptor(validator *protovalidate.Validator, opts ...Option) grpc.UnaryServerInterceptor {
1920
return func(
2021
ctx context.Context,
@@ -40,6 +41,7 @@ func UnaryServerInterceptor(validator *protovalidate.Validator, opts ...Option)
4041
}
4142

4243
// StreamServerInterceptor returns a new streaming server interceptor that validates incoming messages.
44+
// If the request is invalid, clients may access a structured representation of the validation failure as an error detail.
4345
func StreamServerInterceptor(validator *protovalidate.Validator, opts ...Option) grpc.StreamServerInterceptor {
4446
return func(
4547
srv interface{},

0 commit comments

Comments
 (0)