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
[Bug]: IsSuccessStatusCode is true, but Error is non-null #1694
Labels
Comments
We added this workaround extension method so we catch all errors when checking IApiResponse:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug 🐞
We noticed that if you get any serialization errors IsSuccessStatusCode is still true for ApiResponse, but Error is not-null because of error in serialization.
We have this reproducing code. Using xunit and RichardSzalay.MockHttp.
Step to reproduce
Create a class using this code and run the unit-test:
Reproduction repository
No response
Expected behavior
response.Error should not be null when IsSuccessStatusCode is true
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
Refit Version
7.0.0
Additional information ℹ️
No response
The text was updated successfully, but these errors were encountered: