Skip to content

Commit e23bd15

Browse files
committed
feat: add internal error
1 parent 643d011 commit e23bd15

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/errors/AskCodebaseErrorCode.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ export enum AskCodebaseErrorCode {
1919
E10008 = 10008,
2020
/** Environment variable not set */
2121
E10009 = 10009,
22+
/** Internal error */
23+
E10010 = 10010,
2224
}

src/errors/ErrorInternal.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { AskCodebaseError } from "./AskCodebaseError";
2+
import { AskCodebaseErrorCode } from "./AskCodebaseErrorCode";
3+
4+
export class ErrorInternal extends AskCodebaseError {
5+
public static code = AskCodebaseErrorCode.E10010;
6+
7+
constructor(message: string = "Internal error") {
8+
super(ErrorInternal.code, message);
9+
}
10+
}

src/errors/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ export * from "./ErrorGoogleUser";
99
export * from "./ErrorStateNull";
1010
export * from "./ErrorAuthentication";
1111
export * from "./ErrorEnvVariable";
12+
export * from "./ErrorInternal";

0 commit comments

Comments
 (0)