MCPcopy Create free account
hub / github.com/observablehq/framework / isHttpError

Function isHttpError

src/error.ts:32–34  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

30}
31
32export function isHttpError(error: unknown): error is HttpError {
33 return error instanceof Error && "statusCode" in error;
34}
35
36export function isApiError(error: unknown): error is HttpError & {details: {errors: {code: string}[]}} {
37 return (

Callers 10

error-test.tsFile · 0.85
deploy-test.tsFile · 0.85
checkDeployCreatedMethod · 0.85
getDeployTargetMethod · 0.85
createNewDeployMethod · 0.85
promptDeployTargetFunction · 0.85
isApiErrorFunction · 0.85
whoamiFunction · 0.85
PreviewServerClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected