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

Function isUnauthorizedCause

packages/react/src/api/client.tsx:36–43  ·  view source on GitHub ↗
(cause: Cause.Cause<unknown>)

Source from the content-addressed store, hash-verified

34 });
35
36const isUnauthorizedCause = (cause: Cause.Cause<unknown>): boolean =>
37 Option.match(Cause.findErrorOption(cause), {
38 onNone: () => false,
39 onSome: (error) =>
40 HttpClientError.isHttpClientError(error) &&
41 "response" in error &&
42 (error as { readonly response?: { readonly status?: number } }).response?.status === 401,
43 });
44
45const handleApiClientCause = (cause: Cause.Cause<unknown>) =>
46 Effect.suspend(() => {

Callers 1

handleApiClientCauseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected