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

Function isDefinitiveWorkOSDenial

apps/cloud/src/auth/errors.ts:155–156  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

153/** A `WorkOSError` that is a definitive denial (see above), typed on `unknown`
154 * so auth code holding an untyped failure channel can branch safely. */
155export const isDefinitiveWorkOSDenial = (error: unknown): boolean =>
156 isWorkOSError(error) && isDefinitiveWorkOSDenialStatus(error.status);
157
158// Every typed exception the WorkOS node SDK throws for an HTTP answer carries a
159// numeric `.status` (UnauthorizedException 401, NotFoundException 404,

Callers 3

errors.test.tsFile · 0.90
finishAuthorizedFunction · 0.90

Calls 1

Tested by

no test coverage detected