Skip to content

Commit

Permalink
Include result in exception
Browse files Browse the repository at this point in the history
That gives slightly more information in case something goes wrong. However, it
currently only reports something like "errCode: 102", and we don't know what
that means.

This was motivated by issue #6.
  • Loading branch information
Sjord committed Mar 4, 2020
1 parent c5535b2 commit 0dd9e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion growatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ def _back_success_response(self, response):
data = response.json()
result = data["back"]
if not "success" in result or not result["success"]:
raise GrowattApiError()
raise GrowattApiError(result)
return result

0 comments on commit 0dd9e76

Please sign in to comment.