-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Description
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
RestRequestthat queries the HTTP server and tries to parse the JSON into an object - Check
IsSuccessful-> istrueeven though an exception is present inErrorException
Expected behavior
IsSuccessful should be false