MCPcopy Create free account
hub / github.com/bluewave-labs/Checkmate / extractErrorCode

Function extractErrorCode

client/src/Utils/statusCode.ts:23–27  ·  view source on GitHub ↗
(message?: string | null)

Source from the content-addressed store, hash-verified

21 /\b(E[A-Z_]{2,}|CERT_[A-Z_]+|UNABLE_TO_VERIFY[A-Z_]*|DEPTH_ZERO_SELF_SIGNED[A-Z_]*|SELF_SIGNED[A-Z_]*)\b/;
22
23export const extractErrorCode = (message?: string | null): string | null => {
24 if (!message) return null;
25 const match = message.match(ERROR_CODE_PATTERN);
26 return match ? match[1] : null;
27};
28
29export const getNetworkErrorSubtype = (message?: string | null): NetworkErrorSubtype => {
30 if (!message) return "unknown";

Callers 1

getStatusCodeTooltipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected