diff options
| author | Mahesh Sanikommmu <[email protected]> | 2025-08-16 18:50:10 -0700 |
|---|---|---|
| committer | Mahesh Sanikommmu <[email protected]> | 2025-08-16 18:50:10 -0700 |
| commit | 39003aff23d64ff1d96074d71521f6023c9bec01 (patch) | |
| tree | 3f870c04b3dce315bba1b21aa2da158494e71774 /apps/backend/src/errors/baseError.ts | |
| parent | Merge pull request #355 from supermemoryai/archive (diff) | |
| download | supermemory-39003aff23d64ff1d96074d71521f6023c9bec01.tar.xz supermemory-39003aff23d64ff1d96074d71521f6023c9bec01.zip | |
New Version of Supermemory Consumer App
Diffstat (limited to 'apps/backend/src/errors/baseError.ts')
| -rw-r--r-- | apps/backend/src/errors/baseError.ts | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/apps/backend/src/errors/baseError.ts b/apps/backend/src/errors/baseError.ts deleted file mode 100644 index bccc54df..00000000 --- a/apps/backend/src/errors/baseError.ts +++ /dev/null @@ -1,45 +0,0 @@ -export class BaseHttpError extends Error { - public status: number; - public message: string; - - constructor(status: number, message: string) { - super(message); - this.status = status; - this.message = message; - Object.setPrototypeOf(this, new.target.prototype); // Restore prototype chain - } - } - - - export class BaseError extends Error { - type: string; - message: string; - source: string; - ignoreLog: boolean; - - constructor( - type: string, - message?: string, - source?: string, - ignoreLog = false - ) { - super(); - - Object.setPrototypeOf(this, new.target.prototype); - - this.type = type; - this.message = - message ?? - "An unknown error occurred. If this persists, please contact us."; - this.source = source ?? "unspecified"; - this.ignoreLog = ignoreLog; - } - - toJSON(): Record<PropertyKey, string> { - return { - type: this.type, - message: this.message, - source: this.source, - }; - } - }
\ No newline at end of file |