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

[hue] Handle unexpected empty response from API #14297

Merged
merged 1 commit into from Feb 1, 2023

Conversation

lolodomo
Copy link
Contributor

Fix #14218

Signed-off-by: Laurent Garnier lg.hc@free.fr

Fix openhab#14218

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@lolodomo lolodomo added the bug An unexpected problem or unintended behavior of an add-on label Jan 30, 2023
@lolodomo
Copy link
Contributor Author

lolodomo commented Jan 30, 2023

In the issue, we discovered that the API can sometimes return an empty response (with status code 200) when requesting the sensors data.
This PR allows ignoring empty response when lights/sensors/groups/scenes are requested by the scheduled poll job. It avoids a null pointer exception and it avoids the bridge thing going OFFLINE in that case.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM. Only one minor comment.

Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaur jlaur merged commit c162e66 into openhab:main Feb 1, 2023
@jlaur jlaur added this to the 4.0 milestone Feb 1, 2023
@lolodomo lolodomo deleted the hue_empty_response branch February 1, 2023 23:07
@lolodomo
Copy link
Contributor Author

lolodomo commented Feb 2, 2023

Maybe a candidate for 3.4.x branch?

@jlaur
Copy link
Contributor

jlaur commented Feb 2, 2023

Maybe a candidate for 3.4.x branch?

Agreed, I'll cherry-pick in the evening.

jlaur pushed a commit that referenced this pull request Feb 2, 2023
Fix #14218

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@jlaur jlaur added the patch A PR that has been cherry-picked to a patch release branch label Feb 2, 2023
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
Fix openhab#14218

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 2023
Fix openhab#14218

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
FordPrfkt pushed a commit to FordPrfkt/openhab-addons that referenced this pull request Apr 20, 2023
Fix openhab#14218

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[hue] Exception due to empty response from API (sensors)
2 participants