-
-
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
[entsoe] Refactor HTTP error handling #17616
Conversation
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@kaikreuzer - can you add @jmelhus to the contributor team, so he will be added as reviewer for ENTSO-E pull requests? He is our new binding maintainer. 🙂 |
Sure thing - done! Welcome @jmelhus 😄 |
He is invited and needs to accept the invitation before you can see him there. |
Ah, thanks! |
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, LGTM.
Will wait to give @jmelhus some time to confirm.
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, nice additions, looks good to me.
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Thanks for reviewing. What a coincidence: I marked the PR as draft one minute before your approval. The reason was that I was looking into #17668 and started doing a fix when realizing that the |
* Refactor HTTP error handling Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
* Refactor HTTP error handling Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
The primary objective of this pull request is to improve handling of HTTP error code 401 ("Unauthorized") by eliminating exception message string comparison - see #17416 (comment).
Additionally, we will now provide "openHAB" with version number in the
User-Agent
header. This will make it possible to reach out to us in case of any issues.And last, but not least,
InterruptedException
will no longer be swallowed byHttpUtil
and rethrown asIOException
. This allows us rethrowInterruptedException
all the way up the call chain. This will ensure that the thread interruption request is respected immediately, rather than masking the exception by catching it prematurely.