Skip to content

Log FederatorAlreadySignedException as info, not error - #621

Merged
marcos-iov merged 1 commit into
masterfrom
exception-logging
Jul 8, 2026
Merged

marcos-iov merged 1 commit into
masterfrom
exception-logging

Conversation

@marcos-iov

Copy link
Copy Markdown
Collaborator

This pull request updates the exception handling logic in the tryGetReleaseInformation method in BtcReleaseClient.java to provide more specific logging for different exception types. The main change is splitting the catch block to handle FederatorAlreadySignedException separately with an info log, while other exceptions are still logged as errors.

Exception handling improvements:

@marcos-iov
marcos-iov requested a review from a team as a code owner July 8, 2026 18:44
Copilot AI review requested due to automatic review settings July 8, 2026 18:44
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refines exception handling in BtcReleaseClient.tryGetReleaseInformation to better reflect expected/benign conditions in logs: when a pegout is already signed by the current federator, it is now logged at info instead of error.

Changes:

  • Split the previous multi-exception catch into a dedicated FederatorAlreadySignedException catch with info logging.
  • Keep FederationCantSignException and HSMReleaseCreationInformationException logged as error with context.

Comment on lines +381 to +383
} catch (FederatorAlreadySignedException e) {
logger.info("[tryGetReleaseInformation] {}", e.getMessage());
} catch (FederationCantSignException | HSMReleaseCreationInformationException e) {
@sonarqubecloud

sonarqubecloud Bot commented Jul 8, 2026

Copy link
Copy Markdown

@marcos-iov
marcos-iov merged commit 6816664 into master Jul 8, 2026
12 checks passed
@marcos-iov
marcos-iov deleted the exception-logging branch July 8, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants