MCPcopy Create free account
hub / github.com/hashintel/hash / code

Function code

apps/hash-api/src/graphql/error.ts:4–9  ·  view source on GitHub ↗
(
  // eslint-disable-next-line @typescript-eslint/no-shadow
  code: string,
  message: string,
  extensions?: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

2import { GraphQLError } from "graphql";
3
4export const code = (
5 // eslint-disable-next-line @typescript-eslint/no-shadow
6 code: string,
7 message: string,
8 extensions?: Record<string, unknown>,
9) => new GraphQLError(message, { extensions: { code, ...extensions } });
10
11export const badUserInput = (
12 message: string,

Callers 7

badUserInputFunction · 0.85
forbiddenFunction · 0.85
notFoundFunction · 0.85
cyclicTreeFunction · 0.85
badRequestFunction · 0.85
invalidInvitationTypeFunction · 0.85
internalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected