MCPcopy Index your code
hub / github.com/vercel/vercel / error

Function error

packages/cli/src/util/output/error.ts:5–19  ·  view source on GitHub ↗
(
  ...input: string[] | [Pick<APIError, 'slug' | 'message' | 'link' | 'action'>]
)

Source from the content-addressed store, hash-verified

3import renderLink from './link';
4
5export default function error(
6 ...input: string[] | [Pick<APIError, 'slug' | 'message' | 'link' | 'action'>]
7) {
8 let messages = input;
9 if (typeof input[0] === 'object') {
10 const { slug, message, link, action = 'Learn More' } = input[0];
11 messages = [message];
12 const details = slug ? `https://err.sh/vercel/${slug}` : link;
13 if (details) {
14 messages.push(`${chalk.bold(action)}: ${renderLink(details)}`);
15 }
16 }
17
18 return `${chalk.red('Error:')} ${messages.join('\n')}`;
19}

Callers 11

handleInitDeploymentFunction · 0.85
handleDefaultDeployFunction · 0.85
handleContinueDeploymentFunction · 0.85
contractFunction · 0.85
inspectFunction · 0.85
removeFunction · 0.85
listFunction · 0.85
usageFunction · 0.85
execExtensionFunction · 0.85
loadFunction · 0.85
handle_submitFunction · 0.85

Calls 2

pushMethod · 0.65
joinMethod · 0.45

Tested by

no test coverage detected