waggle-sensor / beehive-server

Waggle cloud software for aggregation, storage and analysis of sensor data from Waggle nodes.
13 stars 17 forks source link

Better error message and status codes from beehive-flask #37

Closed seanshahkarami closed 6 years ago

seanshahkarami commented 6 years ago

Currently, beehive-flask does not produce useful feedback on what's happening internally when things go wrong. In order to improve development and debugging, it's important to get reasonable error messages and status codes in exceptional cases. Here are a couple examples:

  1. The database is not up yet. Flask should not crash - it should give the user a friendly warning that the database is not available right now and to retry later.

  2. An invalid or nonexistent node is queried. Flask should make this clear and not just return a page with no datasets.

Having proper feedback without having to dig into the logs would go a long way for debugging and, more importantly, providing a good user experience.

seanshahkarami commented 6 years ago

I'm choosing to close this for now, as I'm not sure patching what's there is worth the time investment in light of caching, statically generated datasets and a potential rewrite.