Move ConfigurationError out of util.ts

This commit is contained in:
Michael B. Gale
2026-10-16 18:51:35 +01:00
parent 83e1837c6d
commit 8bdea824e2
3 changed files with 11 additions and 8 deletions

6
lib/entry-points.js generated
View File

@@ -169373,6 +169373,10 @@ var semver = __toESM(require_semver2());
var maximumVersion = "3.23";
var minimumVersion = "3.18";
// src/errors/index.ts
var ConfigurationError = class extends Error {
};
// src/json/index.ts
function parseString(data) {
return JSON.parse(data);
@@ -169830,8 +169834,6 @@ var HTTPError = class extends Error {
this.status = status;
}
};
var ConfigurationError = class extends Error {
};
function asHTTPError(arg) {
if (!isObject2(arg) || !isString(arg.message)) {
return void 0;

5
src/errors/index.ts Normal file
View File

@@ -0,0 +1,5 @@
/**
* An Error class that indicates an error that occurred due to
* a misconfiguration of the action or the CodeQL CLI.
*/
export class ConfigurationError extends Error {}

View File

@@ -23,11 +23,13 @@ import {
getEnv,
type Env,
} from "./environment";
import { ConfigurationError } from "./errors";
import * as json from "./json";
import { Language } from "./languages";
import { Logger } from "./logging";
// Re-export for backwards compatibility to avoid updating a lot of imports elsewhere.
export { ConfigurationError } from "./errors";
export {
getRequiredEnvParam,
getOptionalEnvVar,
@@ -573,12 +575,6 @@ export class HTTPError extends Error {
}
}
/**
* An Error class that indicates an error that occurred due to
* a misconfiguration of the action or the CodeQL CLI.
*/
export class ConfigurationError extends Error {}
export function asHTTPError(arg: any): HTTPError | undefined {
if (!json.isObject<any>(arg) || !json.isString(arg.message)) {
return undefined;