Skip to content

Commit

Permalink
fix(error): set prototype of BiseoError explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
withSang committed Oct 24, 2023
1 parent e68e590 commit 5ea9003
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/api/src/lib/error.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import type { Error as ErrorResponse } from "@biseo/interface/helpers";
import logger from "@biseo/api/utils/logger";

export class BiseoError {
message: string;

export class BiseoError extends Error {
constructor(message: string) {
this.message = message;
super(message);
Object.setPrototypeOf(this, BiseoError.prototype);
}

serialize() {
Expand Down

0 comments on commit 5ea9003

Please sign in to comment.