fix: exit cleanly on failed login in oiecommand#265
Open
dowel015 wants to merge 1 commit intoOpenIntegrationEngine:mainfrom
Open
fix: exit cleanly on failed login in oiecommand#265dowel015 wants to merge 1 commit intoOpenIntegrationEngine:mainfrom
dowel015 wants to merge 1 commit intoOpenIntegrationEngine:mainfrom
Conversation
…e#224) UnauthorizedException was caught by the generic ClientException handler which only printed a stack trace and returned, leaving Jersey HTTP client threads running and the process hanging indefinitely. Catch UnauthorizedException before ClientException, print a clear "invalid username or password" message, and call System.exit(1) so the process terminates. Also exit on other ClientExceptions rather than swallowing them silently. Fixes OpenIntegrationEngine#224 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
60fee51 to
7e5b7e5
Compare
Contributor
|
@dowel015, Thanks for the PR! It looks good to me, but you need to sign your commit to comply with the MPL license of the project. See https://www.secondstate.io/articles/dco/ or the failing check for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
oiecommandhung indefinitely after a failed login becauseUnauthorizedExceptionwas caught by the genericClientExceptionhandler, which only printed a stack trace and returned — leaving Jersey HTTP client threads alive and the JVM runningUnauthorizedExceptioncatch before the genericClientExceptioncatch that prints a clear"invalid username or password"message and callsSystem.exit(1)ClientExceptionhandler to exit rather than silently return, preventing the same hang for other connection errorsFixes #224
Test plan
oiecommand -a https://localhost:8443 -u admin -p wrongpassword— confirm it prints a clean error and exits immediately with code 1🤖 Generated with Claude Code