MCPcopy Create free account
hub / github.com/angular/dev-infra / isGithubApiError

Function isGithubApiError

ng-dev/utils/git/github.ts:148–156  ·  view source on GitHub ↗
(obj: unknown)

Source from the content-addressed store, hash-verified

146
147/** Whether the given object corresponds to an Octokit API request error. */
148export function isGithubApiError(obj: unknown): obj is RequestError {
149 return (
150 obj instanceof Error &&
151 // Note: Cannot use `instanceof` here because Octokit may use a different
152 // version of `@octokit/request-error` due to version mismatch/hoisting.
153 obj.constructor.name === 'RequestError' &&
154 (obj as Partial<RequestError>).request !== undefined
155 );
156}

Callers 7

invokeWithRetryFunction · 0.85
performMergeFunction · 0.85
mergeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected