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

Correctly fallback to relogin when token renew fails #96

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

wrouesnel
Copy link

Every type of request error should trigger a token renew and then a login re-attempt.

This PR fixes the problem by making the two types of request errors proper subclasses of RequestError, which in turn is a subclass of UhooError.

I've tested this working successfully to fix the uhoo-homeassistant plugin by simply updating the manifest file to pull this version from git instead (version is bumped to 0.0.6a2 to distinguish).

Every type of request error should trigger a token renew and then
a login re-attempt.
@wrouesnel wrouesnel changed the title Try and re-login on all request errors Correctly fallback to relogin when token renew fails Apr 4, 2023
wrouesnel and others added 5 commits May 3, 2023 09:11
Test cases used to check for an exact match of extra keys. Make the
test more robust by only checking for a near match.
The device data return has changed to returning flat values rather
then `{ "key" : {"value": value }}` format.
@wrouesnel
Copy link
Author

This PR now contains fixes for the latest breaking change for the uHoo cloud API.

@wrouesnel wrouesnel force-pushed the master branch 4 times, most recently from 41e8c83 to ed868c7 Compare March 13, 2024 03:52
This is a breaking API change introduced by uHoo
upstream and has been adapted.
@wrouesnel wrouesnel force-pushed the master branch 3 times, most recently from eef8d21 to b8a03a4 Compare March 13, 2024 04:43
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

Successfully merging this pull request may close these issues.

1 participant