You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to discus the default panic handler in recovery package.
From my experience we always have a top level error handling interceptor that catches all non-grpc errors, sends them to a service like sentry and hides the details from users with status.Error(codes.Internal, "internal error"), so at least it should be fmt.Errorf("panic caught: %v", p).
The second thing is panic stack traces which are really important to track the root cause. The standard http server does it this way.
I do understand that this can be achieved using a custom panic handler but I suppose many people would like this changes and I would stop copy-pasting the following code to every project:
Hi there.
I'd like to discus the default panic handler in recovery package.
From my experience we always have a top level error handling interceptor that catches all non-grpc errors, sends them to a service like sentry and hides the details from users with
status.Error(codes.Internal, "internal error")
, so at least it should befmt.Errorf("panic caught: %v", p)
.The second thing is panic stack traces which are really important to track the root cause. The standard http server does it this way.
I do understand that this can be achieved using a custom panic handler but I suppose many people would like this changes and I would stop copy-pasting the following code to every project:
The text was updated successfully, but these errors were encountered: