Skip to content
Snippets Groups Projects
Commit 7e5faf1e authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Change message when database returns nothing

parent 8ec2a94a
No related branches found
No related tags found
1 merge request!116Release v1.0.0
Pipeline #
......@@ -10,7 +10,7 @@ function query(req, res, next) {
log.debug(result);
req.result = result;
if (result.length === 0) {
next({status: 404, message: 'Not Found'});
next({status: 404, message: 'No results found in database'});
}
next();
}, (error) => {
......
......@@ -84,7 +84,7 @@ describe('Query middleware', () => {
error.should.have.property('status');
error.status.should.be.equal(404);
error.should.have.property('message');
error.message.should.be.equal('Not Found');
error.message.should.be.equal('No results found in database');
done();
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment