MCPcopy
hub / github.com/claude-code-best/claude-code / errorMessage

Function errorMessage

src/commands/remote-setup/remote-setup.tsx:56–67  ·  view source on GitHub ↗
(err: ImportTokenError, codeUrl: string)

Source from the content-addressed store, hash-verified

54}
55
56function errorMessage(err: ImportTokenError, codeUrl: string): string {
57 switch (err.kind) {
58 case 'not_signed_in':
59 return `Login failed. Please visit ${codeUrl} and login using the GitHub App`;
60 case 'invalid_token':
61 return 'GitHub rejected that token. Run `gh auth login` and try again.';
62 case 'server':
63 return `Server error (${err.status}). Try again in a moment.`;
64 case 'network':
65 return "Couldn't reach the server. Check your connection.";
66 }
67}
68
69type Step = { name: 'checking' } | { name: 'confirm'; token: RedactedGithubToken } | { name: 'uploading' };
70

Callers 15

handleConfirmFunction · 0.70
DesktopHandoffFunction · 0.50
MCPRemoteServerMenuFunction · 0.50
MCPStdioServerMenuFunction · 0.50
PromptInputFunction · 0.50
handleTeleportFunction · 0.50
submitTranscriptShareFunction · 0.50
runFunction · 0.50
startDetachedPollFunction · 0.50
launchDetachedFunction · 0.50
applyChangesFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected