MCPcopy Index your code
hub / github.com/sourcebot-dev/sourcebot / isOctokitRequestError

Function isOctokitRequestError

packages/backend/src/github.ts:57–66  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

55 * Type guard to check if an error is an Octokit RequestError.
56 */
57export const isOctokitRequestError = (error: unknown): error is RequestError => {
58 return (
59 error !== null &&
60 typeof error === 'object' &&
61 'status' in error &&
62 typeof error.status === 'number' &&
63 'name' in error &&
64 error.name === 'HttpError'
65 );
66};
67
68// Limit concurrent GitHub requests to avoid hitting rate limits and overwhelming installations.
69const MAX_CONCURRENT_GITHUB_QUERIES = 5;

Callers 1

fetchWithRetryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected