Skip to content

Commit

Permalink
Seperate 404
Browse files Browse the repository at this point in the history
  • Loading branch information
srikanthlogic committed Feb 4, 2024
1 parent e9622dc commit 7a48d6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,11 @@ function anonymizeReplyText(replyText, userName) {
}

function errorHandler(err, req, res, next) {
res.status(400).json({ message: err.message });
if (err.message === "App not found (404)") {
res.status(404).json({ error: "App not found", message: err.message });
} else {
res.status(400).json({ error: "Bad Request", message: err.message });
}
next();
}

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7a48d6c

Please sign in to comment.