diff --git a/src/errors/AskCodebaseErrorCode.ts b/src/errors/AskCodebaseErrorCode.ts index 1ae638d..1026400 100644 --- a/src/errors/AskCodebaseErrorCode.ts +++ b/src/errors/AskCodebaseErrorCode.ts @@ -19,4 +19,6 @@ export enum AskCodebaseErrorCode { E10008 = 10008, /** Environment variable not set */ E10009 = 10009, + /** Internal error */ + E10010 = 10010, } diff --git a/src/errors/ErrorInternal.ts b/src/errors/ErrorInternal.ts new file mode 100644 index 0000000..d83b02f --- /dev/null +++ b/src/errors/ErrorInternal.ts @@ -0,0 +1,10 @@ +import { AskCodebaseError } from "./AskCodebaseError"; +import { AskCodebaseErrorCode } from "./AskCodebaseErrorCode"; + +export class ErrorInternal extends AskCodebaseError { + public static code = AskCodebaseErrorCode.E10010; + + constructor(message: string = "Internal error") { + super(ErrorInternal.code, message); + } +} diff --git a/src/errors/index.ts b/src/errors/index.ts index 465e368..2544923 100644 --- a/src/errors/index.ts +++ b/src/errors/index.ts @@ -9,3 +9,4 @@ export * from "./ErrorGoogleUser"; export * from "./ErrorStateNull"; export * from "./ErrorAuthentication"; export * from "./ErrorEnvVariable"; +export * from "./ErrorInternal";