MCPcopy
hub / github.com/prisma/prisma / formatError

Method formatError

packages/cli/src/postgres/link/Link.ts:272–278  ·  view source on GitHub ↗
(err: unknown)

Source from the content-addressed store, hash-verified

270 }
271
272 private static formatError(err: unknown): HelpError {
273 if (err instanceof LinkApiError) {
274 return new HelpError(`\n${bold(red('!'))} ${sanitizeErrorMessage(err.message)}`)
275 }
276 const message = err instanceof Error ? err.message : String(err)
277 return new HelpError(`\n${bold(red('!'))} ${sanitizeErrorMessage(message)}`)
278 }
279
280 public help(error?: string): string | HelpError {
281 if (error) {

Callers 1

parseMethod · 0.80

Calls 1

sanitizeErrorMessageFunction · 0.90

Tested by

no test coverage detected