-
-
Notifications
You must be signed in to change notification settings - Fork 748
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
Content in ValidationApiException hides Content in derived ApiException #636
Comments
I'm having this exact issue right now. Took me 30 minutes to finally track down this issue. |
It's because the request object is disposed when catching the exception. I'll look at how to do this in a better fashion. |
type is ValidationApiException. fixes reactiveui#636
@jamiehowarth0 See my PR! |
I'm facing this exact same issue. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi
I think it's a bad design to hide the Content property of the derived class ApiException. The reason is that if you don't catch ValidationApiException but catch ApiException, you expect to get the Content property as string. However, if the real content is a problem+json document, it's null in the ApiException.
A better approach would be to have a new property in the ValidationApiException class that returns the ProblemDetails and keep Content as text, giving the client a chance to deserialize the problem itself.
Staffan
The text was updated successfully, but these errors were encountered: