-
-
Notifications
You must be signed in to change notification settings - Fork 167
Closed
Labels
Description
The error handling code in middleware/sendJSON.js has some potential problems:
- It relies on a module, elasticsearch-exceptions, that is 3 years old and reportedly only supports Elasticsearch 1.4
- In the case of errors, it sets the default error code to 400. This means that a lot of errors such as failures to connect to other services are reported as 400 instead of 500 errors. 400 errors should be reserved for cases where the user's input, such as query params, are incorrect.
Reactions are currently unavailable