404 code to 200 code with an error code string

404 error without an error code string is inconsistent when compared to all other methods. While on that topic, is there any reason for not using the right http response codes

Sorry for all the issues 😁. Knowing me there's more to come. I'll get on the SHA password encryption as soon as I get my application working enough.
This commit is contained in:
Louis Laureys 2019-08-17 00:58:26 +02:00 committed by GitHub
parent f9ee7d6200
commit 667dce4a94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -475,9 +475,9 @@ module.exports = (db, server) => {
} }
if (!r.deletedCount) { if (!r.deletedCount) {
res.status(404);
res.json({ res.json({
error: 'Filter was not found' error: 'Filter was not found',
code: 'FilterNotFound'
}); });
return next(); return next();
} }