Skip to content

Commit

Permalink
refactor: directory return the error response in the handler
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanCassiere committed Jun 24, 2024
1 parent cb2df50 commit 403de4c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ app.get("/", (c) => {

app.onError(function handleError(err, c) {
if (err instanceof HTTPException) {
const response = err.getResponse();
return response;
return err.getResponse();
}

c.status(500);
Expand Down

0 comments on commit 403de4c

Please sign in to comment.