MCPcopy
hub / github.com/codebymitch/TitanBot / getErrorMetadata

Function getErrorMetadata

src/utils/errorRegistry.js:101–108  ·  view source on GitHub ↗
(errorCode)

Source from the content-addressed store, hash-verified

99}
100
101export 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
110export function getDefaultErrorCodeByType(errorType = 'unknown') {
111 return TypeToErrorCode[errorType] || ErrorCodes.UNKNOWN_ERROR;

Callers 3

ensureTypedServiceErrorFunction · 0.90
buildErrorLogDataFunction · 0.90
sendErrorResponseFunction · 0.90

Calls 1

normalizeErrorCodeFunction · 0.85

Tested by

no test coverage detected