MCPcopy Create free account
hub / github.com/atomicdata-dev/atomic-data-browser / isUnauthorized

Function isUnauthorized

lib/src/error.ts:9–16  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

7
8/** Pass any error. If the error is an AtomicError and it's Unauthorized, return true */
9export function isUnauthorized(error: Error): boolean {
10 if (error instanceof AtomicError) {
11 if (error.type == ErrorType.Unauthorized) {
12 return true;
13 }
14 }
15 return false;
16}
17
18/**
19 * Atomic Data Errors have an additional Type, which tells the client what kind

Callers 2

isUnauthorizedMethod · 0.90
ErrorPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected