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

Automatically fix broken registrations/webhooks #3875

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

jpelgrom
Copy link
Member

@jpelgrom jpelgrom commented Sep 18, 2023

Summary

After helping a few users recently with broken webhooks causing issues, as the app appears to be working but anything depending on the webhook doesn't, I decided to implement an automatic fix for this. It's easy to recognise in the log files so it also should be easy to handle with code:

  • HTTP 200 with empty body: direct connection broken webhook
  • HTTP 404: broken cloudhook
  • HTTP 410: no config entry (and as a result, also a broken webhook)

By doing a new registration we get a new webhook. Removes the need for the user to log out and back in again.

The iOS app does something very similar.

Screenshots

n/a

Link to pull request in Documentation repository

n/a

Any other notes

Copy link
Member

@dshokouhi dshokouhi left a comment

Choose a reason for hiding this comment

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

This is great, good to know iOS did something similar too :)

@JBassett JBassett merged commit 3915ec6 into home-assistant:master Sep 19, 2023
4 checks passed
@jpelgrom jpelgrom deleted the autofix-broken-webhook branch September 19, 2023 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants