MCPcopy Create free account
hub / github.com/vercel/vercel / getErrorMessage

Function getErrorMessage

packages/cli-exec/src/errutils.ts:4–10  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

2 * Converts any thrown value into a message suitable for diagnostics.
3 */
4export function getErrorMessage(error: unknown): string {
5 if (error instanceof Error) {
6 return error.message;
7 }
8
9 return String(error);
10}
11
12/**
13 * Returns whether a filesystem error means the requested path is absent.

Callers 5

statIfExistsFunction · 0.90
getLocalVercelPackageBinFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected