(errorCode)
| 99 | } |
| 100 | |
| 101 | export function getErrorMetadata(errorCode) { |
| 102 | const normalized = normalizeErrorCode(errorCode); |
| 103 | if (!normalized) { |
| 104 | return ErrorCodeRegistry[ErrorCodes.UNKNOWN_ERROR]; |
| 105 | } |
| 106 | |
| 107 | return ErrorCodeRegistry[normalized] || ErrorCodeRegistry[ErrorCodes.UNKNOWN_ERROR]; |
| 108 | } |
| 109 | |
| 110 | export function getDefaultErrorCodeByType(errorType = 'unknown') { |
| 111 | return TypeToErrorCode[errorType] || ErrorCodes.UNKNOWN_ERROR; |
no test coverage detected