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
We have mock APIs which send a request to the earth911's API and then forward its response to the client
/earth911.getPostalData
/earth911.searchLocations
/earth911.getLocationDetails
If you hit any of these API endpoints, with an invalid api_key query parameter, and hit the endpoint again with valid one, you should see the error in the terminal
I believe this is because there are missing return statements in the controllers for these endpoints.
here, instead of res.send({ err: "invalid key" });, there should be return res.send({ err: "invalid key" });
This will sure that the response is sent and the function call is also over.
The text was updated successfully, but these errors were encountered:
Context
earth911
's API and then forward its response to the client/earth911.getPostalData
/earth911.searchLocations
/earth911.getLocationDetails
api_key
query parameter, and hit the endpoint again with valid one, you should see the error in the terminalhere, instead of
res.send({ err: "invalid key" });
, there should bereturn res.send({ err: "invalid key" });
This will sure that the response is sent and the function call is also over.
The text was updated successfully, but these errors were encountered: