-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add parameters to RemoteException message #337
Conversation
Generate changelog in
|
Thoughts on this proposal? #353 |
70ea62c
to
3972fad
Compare
I think #353 was definitely a positive change. But I would still like to have |
Another argument for this: When propagating errors by re-throwing Remote- as ServiceExceptions, you no longer need to convert parameter maps to args. |
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
This PR should stay open. @dansanduleac @ferozco can someone take a look at this PR? |
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
@palantir/infrastructure any updates here? |
This PR has been automatically marked as stale because it has not been touched in the last 14 days. If you'd like to keep it open, please leave a comment or add the 'long-lived' label, otherwise it'll be closed in 7 days. |
Ok so I don't have the full context that motivated this PR (the inconsistency doesn't bother me too much), but I think the PR in its current state seems reasonable!
@pkoenig10 could you provide a tiny bit more context of why you want this? (Just to help me get over my "if it ain't broke don't fix it" resistance). Also if there are any downsides others know of that I haven't listed above please shout otherwise let's just merge it. |
@iamdanfox there aren't any downsides other than the ones you've already listed. I opened this PR before #353 so my primary motivation was to make Looking back at this PR after rebasing on #353, it probably doesn't add much value because the args are all unsafe. I think @carterkozak makes a good argument for why he decided to just omit the args here: Lines 62 to 63 in 9be6496
At this point I'm pretty indifferent about merging vs closing this PR. Having the consistency would be nice, but introducing additional cost for little to no value seems a bit silly. |
OK cool - if there aren't big upsides then I think i'd prefer to just park this and leave things as they are to avoid unintended consequences. |
Fixes #226
Before this PR
The implementations of
RemoteException
andServiceException
are not consistent:RemoteException
does not implementSafeLoggable
,ServiceException
doesRemoteException#getMessage
does not include the parameters,ServiceException#getMessage
doesAfter this PR
The implementations of
RemoteException
andServiceException
are more consistent:SafeLoggable
.getLogMessage
does not include any args/parameters.getMessage
includes all args/parameters, including unsafe args.This is slightly different than #227 because this PR adds the parameters to the
RemoteException
message.