Compare commits

...

1 Commits

Author SHA1 Message Date
nickfyson
3e94e32f68 add rate limit exhaustion as configuration error 2025-03-05 14:16:20 +00:00
3 changed files with 15 additions and 1 deletions

6
lib/cli-errors.js generated
View File

@@ -127,6 +127,7 @@ var CliConfigErrorCategory;
CliConfigErrorCategory["OutOfMemoryOrDisk"] = "OutOfMemoryOrDisk";
CliConfigErrorCategory["PackCannotBeFound"] = "PackCannotBeFound";
CliConfigErrorCategory["PackMissingAuth"] = "PackMissingAuth";
CliConfigErrorCategory["RateLimitExhausted"] = "RateLimitExhausted";
CliConfigErrorCategory["SwiftBuildFailed"] = "SwiftBuildFailed";
CliConfigErrorCategory["UnsupportedBuildMode"] = "UnsupportedBuildMode";
})(CliConfigErrorCategory || (exports.CliConfigErrorCategory = CliConfigErrorCategory = {}));
@@ -233,6 +234,11 @@ exports.cliErrorsConfig = {
new RegExp("Do you need to specify a token to authenticate to the registry?"),
],
},
[CliConfigErrorCategory.RateLimitExhausted]: {
cliErrorMessageCandidates: [
new RegExp("API rate limit exceeded for installation\\. If you reach out to GitHub Support for help, please include the request ID"),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp("\\[autobuilder/build\\] \\[build-command-failed\\] `autobuild` failed to run the build command"),

File diff suppressed because one or more lines are too long

View File

@@ -136,6 +136,7 @@ export enum CliConfigErrorCategory {
OutOfMemoryOrDisk = "OutOfMemoryOrDisk",
PackCannotBeFound = "PackCannotBeFound",
PackMissingAuth = "PackMissingAuth",
RateLimitExhausted = "RateLimitExhausted",
SwiftBuildFailed = "SwiftBuildFailed",
UnsupportedBuildMode = "UnsupportedBuildMode",
}
@@ -266,6 +267,13 @@ export const cliErrorsConfig: Record<
),
],
},
[CliConfigErrorCategory.RateLimitExhausted]: {
cliErrorMessageCandidates: [
new RegExp(
"API rate limit exceeded for installation\\. If you reach out to GitHub Support for help, please include the request ID",
),
],
},
[CliConfigErrorCategory.SwiftBuildFailed]: {
cliErrorMessageCandidates: [
new RegExp(