MCPcopy
hub / github.com/upstash/context7 / extractGitHubError

Function extractGitHubError

packages/cli/src/utils/github.ts:155–162  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

153}
154
155async function extractGitHubError(response: Response): Promise<string> {
156 let detail = `HTTP ${response.status}`;
157 try {
158 const body = (await response.json()) as { message?: string };
159 if (body.message) detail += `: ${body.message}`;
160 } catch {}
161 return detail;
162}
163
164async function fetchRepoTree(
165 owner: string,

Callers 2

fetchRepoTreeFunction · 0.85
fetchDefaultBranchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected