Add "Requires authentication" to wrapApiConfigurationError

This commit is contained in:
Henry Mercer
2026-02-02 18:01:52 +00:00
parent 8aac4e47ac
commit 6d4cd5d744
7 changed files with 8 additions and 7 deletions

2
lib/analyze-action.js generated
View File

@@ -105282,7 +105282,7 @@ function wrapApiConfigurationError(e) {
].some((pattern) => pattern.test(httpError.message))) {
return new ConfigurationError(httpError.message);
}
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found")) {
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found") || httpError.message.includes("Requires authentication")) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write"
);

View File

@@ -146015,7 +146015,7 @@ function wrapApiConfigurationError(e) {
].some((pattern) => pattern.test(httpError.message))) {
return new ConfigurationError(httpError.message);
}
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found")) {
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found") || httpError.message.includes("Requires authentication")) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write"
);

2
lib/init-action.js generated
View File

@@ -102618,7 +102618,7 @@ function wrapApiConfigurationError(e) {
].some((pattern) => pattern.test(httpError.message))) {
return new ConfigurationError(httpError.message);
}
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found")) {
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found") || httpError.message.includes("Requires authentication")) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write"
);

View File

@@ -102021,7 +102021,7 @@ function wrapApiConfigurationError(e) {
].some((pattern) => pattern.test(httpError.message))) {
return new ConfigurationError(httpError.message);
}
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found")) {
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found") || httpError.message.includes("Requires authentication")) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write"
);

2
lib/upload-lib.js generated
View File

@@ -104895,7 +104895,7 @@ function wrapApiConfigurationError(e) {
].some((pattern) => pattern.test(httpError.message))) {
return new ConfigurationError(httpError.message);
}
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found")) {
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found") || httpError.message.includes("Requires authentication")) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write"
);

View File

@@ -104941,7 +104941,7 @@ function wrapApiConfigurationError(e) {
].some((pattern) => pattern.test(httpError.message))) {
return new ConfigurationError(httpError.message);
}
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found")) {
if (httpError.message.includes("Bad credentials") || httpError.message.includes("Not Found") || httpError.message.includes("Requires authentication")) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write"
);

View File

@@ -306,7 +306,8 @@ export function wrapApiConfigurationError(e: unknown) {
}
if (
httpError.message.includes("Bad credentials") ||
httpError.message.includes("Not Found")
httpError.message.includes("Not Found") ||
httpError.message.includes("Requires authentication")
) {
return new ConfigurationError(
"Please check that your token is valid and has the required permissions: contents: read, security-events: write",