When the log in fails because of an invalid email or password, the API returns a HTTP 200 response with the following JSON content (tested with the example config):
This pull request adds a check for this response (to be more specific, it checks for a non-zero code value, since even hasError is false in this error response ...) and logs an appropriate error message:
ERROR:root:Failed to log in: Email or password error.
When the log in fails because of an invalid email or password, the API returns a HTTP 200 response with the following JSON content (tested with the example config):
Currently, this error is ignored by pygoodwe.
This pull request adds a check for this response (to be more specific, it checks for a non-zero
code
value, since evenhasError
isfalse
in this error response ...) and logs an appropriate error message: