Describe the bug
When using RestSharp v107+ IsSuccessful in RestResponse remains true even when an exception like an unsuccessful deserialization occurs. As this is a major change to the old behavior, which is going to affect a lot of projects that use this library, I checked the migration guide and the documentation for this change but could not find anything about it. Therefor I assume this is a bug.
To Reproduce
- Start a HTTP server that returns a success status code and an invalid JSON as content
- Create a
RestRequest that queries the HTTP server and tries to parse the JSON into an object
- Check
IsSuccessful -> is true even though an exception is present in ErrorException
Expected behavior
IsSuccessful should be false
Describe the bug
When using RestSharp v107+
IsSuccessfulinRestResponseremainstrueeven when an exception like an unsuccessful deserialization occurs. As this is a major change to the old behavior, which is going to affect a lot of projects that use this library, I checked the migration guide and the documentation for this change but could not find anything about it. Therefor I assume this is a bug.To Reproduce
RestRequestthat queries the HTTP server and tries to parse the JSON into an objectIsSuccessful-> istrueeven though an exception is present inErrorExceptionExpected behavior
IsSuccessfulshould be false