Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugInfo ¶
func DebugInfo(err error) *errdetails.DebugInfo
DebugInfo extracts a debug info from an error. If the error is not a gRPC error or does not contain a debug info, it returns nil. In case of multiple debug info, it returns the first one.
func ErrorCode ¶
ErrorCode extracts a gRPC error code from an error. If the error is not a gRPC error, it returns codes.Unknown.
func ErrorInfo ¶
func ErrorInfo(err error) *errdetails.ErrorInfo
ErrorInfo extracts an error info from an error. If the error is not a gRPC error or does not contain an error info, it returns nil. In case of multiple error info, it returns the first one.
func IsCanceled ¶
IsCanceled is a shortcut for checking if an error is a grpc canceled error. Note that it does not check for context.Canceled, only for gRPC canceled.
func RetryInfo ¶
func RetryInfo(err error) *errdetails.RetryInfo
RetryInfo extracts a retry info from an error. If the error is not a gRPC error or does not contain a retry info, it returns nil. In case of multiple retry info, it returns the first one.
Types ¶
This section is empty.