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

Function getExecutionErrorStatus

apps/sim/executor/utils/errors.ts:106–112  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

104 * etc.) carry a 4xx `statusCode`; everything else is a 500.
105 */
106export function getExecutionErrorStatus(error: unknown): number {
107 const status = readStatusCode(error)
108 if (status !== undefined && status >= 400 && status < 500) {
109 return status
110 }
111 return 500
112}
113
114export function normalizeError(error: unknown): string {
115 if (error instanceof Error) {

Callers 1

handleExecutePostFunction · 0.90

Calls 1

readStatusCodeFunction · 0.85

Tested by

no test coverage detected