Skip to content

Commit

Permalink
fix: PojoError constructor name
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 committed Apr 9, 2022
1 parent dc8fe81 commit 281ce51
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export class PojoError<
this.data = data;
this.cause = options.cause;
this.message = data.message;
this.name = this.constructor.name;

if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(this, options.constructorOpt);
Expand Down

0 comments on commit 281ce51

Please sign in to comment.