jjmark15 / quiz-app

MIT License
0 stars 0 forks source link

requests to invalid routes should return 404 instead of 500 #25

Closed jjmark15 closed 4 years ago

jjmark15 commented 4 years ago

e.g. currently if you do:

curl -X GET http://localhost:3030/api/greeting/boo -i
HTTP/1.1 500 Internal Server Error
content-type: application/json
content-length: 44
date: Wed, 01 Apr 2020 16:32:31 GMT

{"code":500,"message":"UNHANDLED_REJECTION"}

you get a 500