Skip to content

Commit

Permalink
address Aiden comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yutongp committed Feb 14, 2017
1 parent e1c28fa commit c4574f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/rpc/handler.go
Expand Up @@ -27,9 +27,9 @@ import (
"go.uber.org/fx/auth"
"go.uber.org/fx/modules/rpc/internal/stats"
"go.uber.org/fx/service"
"go.uber.org/yarpc/api/transport"

"github.com/pkg/errors"
"go.uber.org/yarpc/api/transport"
)

const _panicResponse = "Server Error"
Expand Down Expand Up @@ -110,7 +110,7 @@ func (p panicOnewayInboundMiddleware) HandleOneway(ctx context.Context, req *tra
func panicRecovery(ctx context.Context) {
if err := recover(); err != nil {
stats.RPCPanicCounter.Inc(1)
fx.Logger(ctx).Error("Panic recovered serving request", "error", errors.Errorf("panic: %+v", err))
fx.Logger(ctx).Error("Panic recovered serving request", "error", errors.Errorf("panic in handler: %+v", err))
// rethrow panic back to yarpc
// before https://github.com/yarpc/yarpc-go/issues/734 fixed, throw a generic error.
panic(_panicResponse)
Expand Down

0 comments on commit c4574f3

Please sign in to comment.