DecodeError decodes an error. Can only be called if the EncodedError is set (see IsSet()).
(ctx context.Context, enc EncodedError)
| 26 | // |
| 27 | // Can only be called if the EncodedError is set (see IsSet()). |
| 28 | func DecodeError(ctx context.Context, enc EncodedError) error { |
| 29 | if w := enc.GetWrapper(); w != nil { |
| 30 | return decodeWrapper(ctx, w) |
| 31 | } |
| 32 | return decodeLeaf(ctx, enc.GetLeaf()) |
| 33 | } |
| 34 | |
| 35 | func decodeLeaf(ctx context.Context, enc *errorspb.EncodedErrorLeaf) error { |
| 36 | // In case there is a detailed payload, decode it. |
searching dependent graphs…