mirror of
https://github.com/github/codeql-action.git
synced 2026-04-04 18:52:18 +00:00
Add "Requires authentication" to wrapApiConfigurationError
This commit is contained in:
2
lib/analyze-action.js
generated
2
lib/analyze-action.js
generated
@@ -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"
|
||||
);
|
||||
|
||||
2
lib/init-action-post.js
generated
2
lib/init-action-post.js
generated
@@ -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
2
lib/init-action.js
generated
@@ -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"
|
||||
);
|
||||
|
||||
2
lib/setup-codeql-action.js
generated
2
lib/setup-codeql-action.js
generated
@@ -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
2
lib/upload-lib.js
generated
@@ -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"
|
||||
);
|
||||
|
||||
2
lib/upload-sarif-action.js
generated
2
lib/upload-sarif-action.js
generated
@@ -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"
|
||||
);
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user