MakeSubCodedError creates a new CodedError with the given code, subcode, and error.
(code string, subCode string, err error)
| 32 | |
| 33 | // MakeSubCodedError creates a new CodedError with the given code, subcode, and error. |
| 34 | func MakeSubCodedError(code string, subCode string, err error) CodedError { |
| 35 | return CodedError{Code: code, SubCode: subCode, Err: err} |
| 36 | } |
| 37 | |
| 38 | // GetErrorCode extracts the error code from anywhere in the error chain. |
| 39 | // Returns empty string if no CodedError is found. |