You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API endpoints need a revision to ensure all errors are caught. Some of the endpoints only send a response to the client when the queries to the database are completed successfully, but if a parameter is badly constructed, the query fails and the server doesn't response, leading to a timeout.
Also in some cases, there's a condition where the server should send an error and stop the execution, but just sending a response with express doesn't stop the flow of the function, it must return.
The text was updated successfully, but these errors were encountered:
If true, this is something we should take care of sooner rather than later. Thanks for finding this @frabarz. Do you have a couple example queries where these errors occur?
Also, TIL this is an express library. I always assumed it was like, a little python app that @jspeis put together!
Looking again, the code is different depending on the project. The error we found was on the /neighbors/:geoId endpoint for the datamexico-refactor branch.
For the national level on datamexico, tesseract was requesting the neighbors for code mex instead of an integer. That, along with datamexico's level config which defined nation in shapes but not in idMapping, defined an invalid query which was not intercepted by the if, and it throwed when sent to the db without a catch. The error appears in the log but httpResult was never called and the requesting server is left waiting until it itself timeouts.
API endpoints need a revision to ensure all errors are caught. Some of the endpoints only send a response to the client when the queries to the database are completed successfully, but if a parameter is badly constructed, the query fails and the server doesn't response, leading to a timeout.
Also in some cases, there's a condition where the server should send an error and stop the execution, but just sending a response with express doesn't stop the flow of the function, it must return.
The text was updated successfully, but these errors were encountered: