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
For current implementation of function WrapWithSkipAndStatus, if the status is not provided for the first time when the error generated, the status will still remain nil without default value. The default status will be given in the following two situations:
One has generated the error using Orion/utils/errors and then wrap it again. In this case, since the error is originally generated by Orion/utils/errors, the interface interface { GRPCStatus() *Stauts} is then implemented. Thus, the default status will be assigned to a status with gRPC code equals to codes.Internal in the implemented GRPCStatus() *Status function when one wrapping the error again.
One has generated the error using Orion/utils/errors and this error is passed to another gRPC endpoints. In this case, the reason is the same as above situation. When error is passed to another gRPC endpoint, the implemented GRPCStatus() *Status function will be called. Thus, it will then generate a default status with gRPC code equals to codes.Internal.
If the default value of the status will be given in the end, then it should be given in the first place when the error is generated rather than when the error is wrapped again or passed to different gRPC endpoints.
For current implementation of function
WrapWithSkipAndStatus
, if the status is not provided for the first time when the error generated, the status will still remainnil
without default value. The default status will be given in the following two situations:If the default value of the status will be given in the end, then it should be given in the first place when the error is generated rather than when the error is wrapped again or passed to different gRPC endpoints.
Ref: #106
The text was updated successfully, but these errors were encountered: