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

RemoteException emits more safeargs #655

Merged
merged 3 commits into from
Apr 28, 2021

Conversation

iamdanfox
Copy link
Contributor

Before this PR

Context in #dev-rpc - BLUF is that logs in aries are hard to filter when there are many RemoteExceptions, but they have different causes.

After this PR

==COMMIT_MSG==
RemoteExceptions now emit SafeArgs for errorInstanceId, errorCode and errorName (previously it was just errorInstanceId)
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Apr 28, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

RemoteExceptions now emit SafeArgs for errorInstanceId, errorCode and errorName (previously it was just errorInstanceId)

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from carterkozak April 28, 2021 16:03
@@ -49,7 +53,10 @@ public RemoteException(SerializableError error, int status) {
this.message = this.stableMessage + " with instance ID " + error.errorInstanceId();
this.error = error;
this.status = status;
this.args = Collections.singletonList(SafeArg.of("errorInstanceId", error.errorInstanceId()));
this.args = Collections.unmodifiableList(Arrays.asList(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ImmutableList is off the cards cos this project doens't seem to depend on guava, and we still have sourceCompat = 1.8 here so no List.of either.

@bulldozer-bot bulldozer-bot bot merged commit ee7be0b into develop Apr 28, 2021
@bulldozer-bot bulldozer-bot bot deleted the dfox/more-remote-exceptions-safeargs branch April 28, 2021 16:43
@svc-autorelease
Copy link
Collaborator

Released 2.18.0

@iamdanfox
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants