extractErrorCode extracts the error code from an error
(err error)
| 427 | |
| 428 | // extractErrorCode extracts the error code from an error |
| 429 | func extractErrorCode(err error) string { |
| 430 | if err == nil { |
| 431 | return "" |
| 432 | } |
| 433 | if code, ok := goerrors.ExtractErrorCode(err); ok { |
| 434 | return string(code) |
| 435 | } |
| 436 | return "" |
| 437 | } |
| 438 | |
| 439 | // categorizeByCode categorizes errors by error code if available |
| 440 | func categorizeByCode(code, errMsg string) string { |
no outgoing calls
no test coverage detected