File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828import { unzipToDirectoryConcurrently } from "../common/unzip-concurrently" ;
2929import { reportUnzipProgress } from "../common/vscode/unzip-progress" ;
3030import { Release , ReleaseAsset } from "./release" ;
31+ import { GithubRateLimitedError , GithubApiError } from "./github-api-error" ;
3132
3233/**
3334 * distribution.ts
@@ -958,22 +959,3 @@ export interface GithubReleaseAsset {
958959 */
959960 size : number ;
960961}
961-
962- export class GithubApiError extends Error {
963- constructor (
964- public status : number ,
965- public body : string ,
966- ) {
967- super ( `API call failed with status code ${ status } , body: ${ body } ` ) ;
968- }
969- }
970-
971- export class GithubRateLimitedError extends GithubApiError {
972- constructor (
973- public status : number ,
974- public body : string ,
975- public rateLimitResetDate : Date ,
976- ) {
977- super ( status , body ) ;
978- }
979- }
Original file line number Diff line number Diff line change 1+ export class GithubApiError extends Error {
2+ constructor (
3+ public status : number ,
4+ public body : string ,
5+ ) {
6+ super ( `API call failed with status code ${ status } , body: ${ body } ` ) ;
7+ }
8+ }
9+
10+ export class GithubRateLimitedError extends GithubApiError {
11+ constructor (
12+ public status : number ,
13+ public body : string ,
14+ public rateLimitResetDate : Date ,
15+ ) {
16+ super ( status , body ) ;
17+ }
18+ }
Original file line number Diff line number Diff line change @@ -53,9 +53,11 @@ import {
5353 DistributionUpdateCheckResultKind ,
5454 FindDistributionResult ,
5555 FindDistributionResultKind ,
56+ } from "./codeql-cli/distribution" ;
57+ import {
5658 GithubApiError ,
5759 GithubRateLimitedError ,
58- } from "./codeql-cli/distribution " ;
60+ } from "./codeql-cli/github-api-error " ;
5961import { tmpDir , tmpDirDisposal } from "./tmp-dir" ;
6062import { prepareCodeTour } from "./code-tour/code-tour" ;
6163import {
You can’t perform that action at this time.
0 commit comments