Skip to content

Commit baff2d4

Browse files
authored
wrong example misguide user to catch panic (#414)
Signed-off-by: wander1024 <[email protected]>
1 parent 315ddd9 commit baff2d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ import "github.com/grpc-ecosystem/go-grpc-middleware"
2929

3030
myServer := grpc.NewServer(
3131
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
32+
grpc_recovery.StreamServerInterceptor(),
3233
grpc_ctxtags.StreamServerInterceptor(),
3334
grpc_opentracing.StreamServerInterceptor(),
3435
grpc_prometheus.StreamServerInterceptor,
3536
grpc_zap.StreamServerInterceptor(zapLogger),
3637
grpc_auth.StreamServerInterceptor(myAuthFunction),
37-
grpc_recovery.StreamServerInterceptor(),
3838
)),
3939
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
40+
grpc_recovery.UnaryServerInterceptor(),
4041
grpc_ctxtags.UnaryServerInterceptor(),
4142
grpc_opentracing.UnaryServerInterceptor(),
4243
grpc_prometheus.UnaryServerInterceptor,
4344
grpc_zap.UnaryServerInterceptor(zapLogger),
4445
grpc_auth.UnaryServerInterceptor(myAuthFunction),
45-
grpc_recovery.UnaryServerInterceptor(),
4646
)),
4747
)
4848
```

0 commit comments

Comments
 (0)