MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / isHttpError

Function isHttpError

packages/web/src/lib/utils.ts:621–626  ·  view source on GitHub ↗
(error: unknown, status: number)

Source from the content-addressed store, hash-verified

619};
620
621export const isHttpError = (error: unknown, status: number): boolean => {
622 return error !== null
623 && typeof error === 'object'
624 && 'status' in error
625 && error.status === status;
626}
627
628const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
629

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected