Skip to content

Commit

Permalink
fix: error transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
izatop committed May 21, 2021
1 parent 357d6aa commit 7005c56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/web/src/Transport/TransformError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ export class TransformError {
return {code, status};
}

for (const [type, {code, status}] of this.#errorHeadersMap.entries()) {
if (type.isPrototypeOf(this.#error)) {
return {code, status};
}
}

return {code: 500, status: "Internal Server Error"};
}

Expand Down

0 comments on commit 7005c56

Please sign in to comment.