diff --git a/lib/index.js b/lib/index.js index 2bbe773..50ab681 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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(); } diff --git a/package-lock.json b/package-lock.json index 96cd930..987429a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "eslint-plugin-standard": "^5.0.0", "newman": "^6.1.0", "newman-reporter-htmlextra": "^1.23.0", - "npm-check-updates": "^16.14.12" + "npm-check-updates": "^16.14.14" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -6418,9 +6418,9 @@ } }, "node_modules/npm-check-updates": { - "version": "16.14.12", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.12.tgz", - "integrity": "sha512-5FvqaDX8AqWWTDQFbBllgLwoRXTvzlqVIRSKl9Kg8bYZTfNwMnrp1Zlmb5e/ocf11UjPTc+ShBFjYQ7kg6FL0w==", + "version": "16.14.14", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-16.14.14.tgz", + "integrity": "sha512-Y3ajS/Ep40jM489rLBdz9jehn/BMil5s9fA4PSr2ZJxxSmtLWCSmRqsI2IEZ9Nb3MTMu8a3s7kBs0l+JbjdkTA==", "dev": true, "dependencies": { "chalk": "^5.3.0",