MCPcopy Create free account
hub / github.com/massCodeIO/massCode / formatDetailedRequestError

Function formatDetailedRequestError

src/main/ipc/handlers/http.ts:277–290  ·  view source on GitHub ↗
(source: unknown)

Source from the content-addressed store, hash-verified

275}
276
277function formatDetailedRequestError(source: unknown): string | undefined {
278 const record = asRecord(source)
279 if (!record)
280 return undefined
281
282 const code = stringValue(record.code)
283 const syscall = stringValue(record.syscall)
284 const hostPort = formatHostPort(record)
285
286 if (code && hostPort)
287 return [syscall, code, hostPort].filter(Boolean).join(' ')
288
289 return undefined
290}
291
292function getErrorMessage(error: unknown): string | undefined {
293 return stringValue(asRecord(error)?.message)

Callers 1

formatHttpRequestErrorFunction · 0.85

Calls 3

stringValueFunction · 0.85
formatHostPortFunction · 0.85
asRecordFunction · 0.70

Tested by

no test coverage detected