|
res.status(404).send('Could not retrieve the answers.') |
Currently 404 catches all errors and only responds if "Something went wrong". Could the types of errors returned be more specific? For example, if parameters are invalid, this should ideally return a different error code than if the parameters were correct but no resource was found (the number isn't in the dataset).
QuestAPI/src/server/controllers/answers.js
Line 15 in a1ea73d
Currently 404 catches all errors and only responds if "Something went wrong". Could the types of errors returned be more specific? For example, if parameters are invalid, this should ideally return a different error code than if the parameters were correct but no resource was found (the number isn't in the dataset).