MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / statusFromWorkOSCause

Function statusFromWorkOSCause

apps/cloud/src/auth/errors.ts:167–171  ·  view source on GitHub ↗
(cause: unknown)

Source from the content-addressed store, hash-verified

165const decodeCauseWithStatusOption = Schema.decodeUnknownOption(CauseWithStatusSchema);
166
167export const statusFromWorkOSCause = (cause: unknown): number | undefined =>
168 Option.match(decodeCauseWithStatusOption(cause), {
169 onNone: () => undefined,
170 onSome: (decoded) => decoded.status,
171 });
172
173/**
174 * Build the public `WorkOSError` for a WorkOS service-adapter failure,

Callers 1

workosErrorFromFailureFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected