Skip to content

Commit

Permalink
examples: improve 404 message wording
Browse files Browse the repository at this point in the history
closes #4471
  • Loading branch information
aalaap authored and dougwilson committed Dec 16, 2021
1 parent a24f27a commit 21cf522
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/web-service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ app.use(function(err, req, res, next){
// invoke next() and do not respond.
app.use(function(req, res){
res.status(404);
res.send({ error: "Lame, can't find that" });
res.send({ error: "Sorry, can't find that" })
});

/* istanbul ignore next */
Expand Down
6 changes: 3 additions & 3 deletions test/acceptance/web-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ describe('web-service', function(){
describe('when requesting an invalid route', function(){
it('should respond with 404 json', function(done){
request(app)
.get('/api/something?api-key=bar')
.expect('Content-Type', /json/)
.expect(404, '{"error":"Lame, can\'t find that"}', done)
.get('/api/something?api-key=bar')
.expect('Content-Type', /json/)
.expect(404, '{"error":"Sorry, can\'t find that"}', done)
})
})
})

0 comments on commit 21cf522

Please sign in to comment.