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

[feature] add response content to error messages #1

Open
BenPortner opened this issue May 27, 2020 · 0 comments
Open

[feature] add response content to error messages #1

BenPortner opened this issue May 27, 2020 · 0 comments

Comments

@BenPortner
Copy link

Hi @GiorgioBalestrieri!

First off, thanks for providing such a convenient client! I started using it today and it works great! 🤗

While testing, I encountered one minor inconvenience that should be easy to fix and would make renewables-ninja-client even more awesome: The error messages returned when calling query_pv or query_wind with wrong arguments are right now very generic. For example, if I try to get PV data with tilt = 100, I receive requests.exceptions.HTTPError: 400 Client Error: Bad Request for url.... However, when checking the Response object, I see that there is a more conrete error description in the content attribute: Error: tilt must be >= 0 and <= 90. I think it would be awesome if this message was returned along with the HTTP Error code.

Thanks for your effort and keep up the great work! 😃

Cheers.
Ben

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

1 participant