MCPcopy Index your code
hub / github.com/simstudioai/sim / readStatusCode

Function readStatusCode

apps/sim/executor/utils/errors.ts:95–99  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

93}
94
95function readStatusCode(value: unknown): number | undefined {
96 if (!(value instanceof Error)) return undefined
97 const status = (value as unknown as { statusCode?: unknown }).statusCode
98 return typeof status === 'number' ? status : undefined
99}
100
101/**
102 * Maps an execution error to an HTTP status code. Errors thrown from the

Callers 2

buildBlockExecutionErrorFunction · 0.85
getExecutionErrorStatusFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected