Skip to content

Commit

Permalink
Merge pull request #420 from sparcs-kaist/feat/biseo-error-not-extend…
Browse files Browse the repository at this point in the history
…s-error

BiseoError 생성 시 serialize 메서드가 존재하지 않음
  • Loading branch information
SnowSuno authored Oct 25, 2023
2 parents 18e7a68 + 5ea9003 commit 36ebc4f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/api/src/lib/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import type { Error as ErrorResponse } from "@biseo/interface/helpers";
import logger from "@biseo/api/utils/logger";

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

serialize() {
return { ok: false, message: this.message } as const;
}
Expand Down

0 comments on commit 36ebc4f

Please sign in to comment.