Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both post_measurements and get_sensor_data have too generic exception message #84

Open
ArdJonker opened this issue Sep 13, 2024 · 1 comment

Comments

@ArdJonker
Copy link

ArdJonker commented Sep 13, 2024

For many specific error situations both post_measurements and get_sensor_data throw a too generic exception:
An error occurred communicating with the API...

This is not helpful for debugging. For example when a wrong unit (of measurement) is sent, it could indicate this, or when an invalid date (string) for start or duration is sent this could be mentioned in the exception (pref. with the "erroneous" data).
Also, when the sensor_id is invalid (0) this general message shows..

@Flix6x
Copy link
Contributor

Flix6x commented Sep 13, 2024

The FlexMeasures server should be sending back more informative messages than that. It looks like those are getting swallowed here. Could you try setting the logging level to debug and see if the more informative errors appear in your logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants