openfisca / legislation-explorer

Explore legislation formulas and parameters.
https://legislation.demo.openfisca.org
GNU Affero General Public License v3.0
26 stars 13 forks source link

Exit with status code ≠ 0 if the provided Web API can not be fetched #233

Closed MattiSG closed 2 years ago

MattiSG commented 2 years ago

If I run npm start and the source Web Api is not available, I get the following output:

Fetching variables and parameters on Web API...
error: Error: Could not fetch 'http://0.0.0.0:5000/entities'.
    at /Users/mesaides/Documents/legislation-explorer/src/webservices.js:8:26
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

…yet the exit code is 0.

This prevents scripts, including automated deployment tools, from detecting the error.

cbenz commented 2 years ago

Solved with https://github.com/openfisca/legislation-explorer/pull/231/commits/cc14c8818c7a25f04cfd4e99f4fdca64f5ba6f0c in #231