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

Wrap the original exception in ServiceResultException-s thrown from JsonDecoder #2835

Open
1 of 5 tasks
ZbynekZ opened this issue Nov 5, 2024 · 0 comments
Open
1 of 5 tasks
Assignees

Comments

@ZbynekZ
Copy link

ZbynekZ commented Nov 5, 2024

Type of issue

  • Bug
  • Enhancement
  • Compliance
  • Question
  • Help wanted

Current Behavior

When JsonDecoder throws ServiceResultException as a result of some inner exception such as FormatException, JsonReaderException or XmlException, it now includes the error message of the inner exception, but not the inner exception object as such. This makes it impossible to do advanced diagnostics or fine-handle the error in the code that uses JsonDecoder.

In principle this also applies to BinaryDecoder/XmlDecoder, and to the encoders, but at this point for my usage the JsonDecoder is the one that needs this most, for PubSub interoperability troubleshooting efforts.

Expected Behavior

A ServiceResultException constructor or ServiceResultException.Create method with the "innerException" parameter should be used instead, and the original exception passed in.

Steps To Reproduce

No response

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version: 1.5.374.126
- Component:
- Server:
- Client:

Anything else?

No response

@mregen mregen self-assigned this Nov 28, 2024
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

No branches or pull requests

2 participants