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

Function stringifyError

libs/@local/hash-isomorphic-utils/src/stringify-error.ts:3–12  ·  view source on GitHub ↗
(
  err: unknown,
  options: { prettify: boolean } = { prettify: true },
)

Source from the content-addressed store, hash-verified

1import { serializeError } from "serialize-error";
2
3export const stringifyError = (
4 err: unknown,
5 options: { prettify: boolean } = { prettify: true },
6) => {
7 return JSON.stringify(
8 serializeError(err),
9 null,
10 options.prettify ? 2 : undefined,
11 );
12};

Callers 10

persistEntitiesFunction · 0.90
persistLinksFunction · 0.90
extractErrorMessageFunction · 0.90
toolCallExceptionHandlerFunction · 0.90
fixJsonFormattingFunction · 0.90
loginToVaultViaIamFunction · 0.90
renewTokenFunction · 0.90
fetchFlightradar24Function · 0.90
processStepFunction · 0.90

Calls 1

serializeErrorFunction · 0.85

Tested by

no test coverage detected