-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[openuv] Enhance server side error handling #12958
Conversation
Signed-off-by: clinique <gael@lhopital.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I have added a few minor comments.
...ng.openuv/src/main/java/org/openhab/binding/openuv/internal/handler/OpenUVBridgeHandler.java
Outdated
Show resolved
Hide resolved
...ng.openuv/src/main/java/org/openhab/binding/openuv/internal/handler/OpenUVBridgeHandler.java
Outdated
Show resolved
Hide resolved
...ng.openuv/src/main/java/org/openhab/binding/openuv/internal/handler/OpenUVBridgeHandler.java
Outdated
Show resolved
Hide resolved
...ng.openuv/src/main/java/org/openhab/binding/openuv/internal/handler/OpenUVBridgeHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
scheduleReconnectJob(RECONNECT_DELAY_MIN); | ||
} else { | ||
statusDetail = ThingStatusDetail.NONE; | ||
statusMessage = String.format("@text/offline.invalid-json [ \"%s\", \"%s\" ]", url, jsonData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A relatively small message is expected (it will be displayed in UI). Is your jsonData
small ?
If not, maybe you shoudl add a specific DEBUG log entry to log jsonData
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Size of invalid json is not easy to predict, so I take your proposal.
Signed-off-by: clinique <gael@lhopital.org>
Signed-off-by: clinique <gael@lhopital.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jlaur : I let you check your comments and merge if this is ok |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Enhance server side error handling * Enhancing exception tree * a small factorization of error status * Shorten statusMessage * Correcting log syntax Signed-off-by: clinique <gael@lhopital.org>
* Enhance server side error handling * Enhancing exception tree * a small factorization of error status * Shorten statusMessage * Correcting log syntax Signed-off-by: clinique <gael@lhopital.org>
* Enhance server side error handling * Enhancing exception tree * a small factorization of error status * Shorten statusMessage * Correcting log syntax Signed-off-by: clinique <gael@lhopital.org> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
* Enhance server side error handling * Enhancing exception tree * a small factorization of error status * Shorten statusMessage * Correcting log syntax Signed-off-by: clinique <gael@lhopital.org>
* Enhance server side error handling * Enhancing exception tree * a small factorization of error status * Shorten statusMessage * Correcting log syntax Signed-off-by: clinique <gael@lhopital.org>
This pull request is aimed to solve issue #12932 .
It helps the binding auto reconnect on two known server issues, when db is not available, and when a good apikey fails due to....wrong behaviour of the server.
If these errors are detected, the bridge goes offline for five minutes, then tries to reconnect.
Signed-off-by: clinique gael@lhopital.org