Skip to content

Commit

Permalink
feat: add internal error
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbond committed Aug 10, 2023
1 parent 643d011 commit e23bd15
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/errors/AskCodebaseErrorCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ export enum AskCodebaseErrorCode {
E10008 = 10008,
/** Environment variable not set */
E10009 = 10009,
/** Internal error */
E10010 = 10010,
}
10 changes: 10 additions & 0 deletions src/errors/ErrorInternal.ts
Original file line number Diff line number Diff line change
@@ -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);
}
}
1 change: 1 addition & 0 deletions src/errors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ export * from "./ErrorGoogleUser";
export * from "./ErrorStateNull";
export * from "./ErrorAuthentication";
export * from "./ErrorEnvVariable";
export * from "./ErrorInternal";

0 comments on commit e23bd15

Please sign in to comment.