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

[ecovacs] Fix expired token handling for XML-over-MQTT models #17333

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maniac103
Copy link
Contributor

At least the Deebot 900 sends an unusual error response in case of expired token.

Fixes #15961

At least the Deebot 900 sends an unusual error response in case of
expired token.

Fixes openhab#15961

Signed-off-by: Danny Baumann <[email protected]>
@lsiepel lsiepel added the bug An unexpected problem or unintended behavior of an add-on label Aug 29, 2024
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Minor improvement suggestion. This is marked as draft, is that because it needs some testing or more work?

Comment on lines +47 to +48
String errorMessage = errorObject != null ? errorObject.toString().toLowerCase() : null;
return errorMessage != null && (errorMessage.contains("auth error") || errorMessage.contains("token error"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
String errorMessage = errorObject != null ? errorObject.toString().toLowerCase() : null;
return errorMessage != null && (errorMessage.contains("auth error") || errorMessage.contains("token error"));
String errorMessage = errorObject != null ? errorObject.toString().toLowerCase() : "";
return errorMessage.contains("auth error") || errorMessage.contains("token error");

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ecovacs] Robot not updated after some time
2 participants