medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
467 stars 217 forks source link

bootstraper does not handle errors if pouch fails to load #3861

Closed alxndrsn closed 7 years ago

alxndrsn commented 7 years ago

Looks to me like the bootstrapper will throw an unhandled Error back to app.js if one of PouchDB() calls at https://github.com/medic/medic-webapp/blob/master/static/js/bootstrap.js#L85, https://github.com/medic/medic-webapp/blob/master/static/js/bootstrap.js#L96 fail.

The first one is the most likely to fail.

Likely related to https://github.com/medic/medic-webapp/issues/2090#issuecomment-326561071

alxndrsn commented 7 years ago

In practice this seems to work OK.