Skip to content

Commit b5efc85

Browse files
committed
Update the error docs
1 parent 9f300ee commit b5efc85

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

docs/.idea/codeStyles/codeStyleConfig.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/usage/exceptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Error Handling
22

3-
If there is a network transport error (network is down, failed DNS lookup, etc), `RestResponse.ResponseStatus` will be set to `ResponseStatus.Error`, otherwise it will be `ResponseStatus.Completed`.
3+
If there is a network transport error (network is down, failed DNS lookup, etc), or any kind of server error (except 404), `RestResponse.ResponseStatus` will be set to `ResponseStatus.Error`, otherwise it will be `ResponseStatus.Completed`.
44

55
If an API returns a 404, `ResponseStatus` will still be `Completed`. If you need access to the HTTP status code returned you will find it at `RestResponse.StatusCode`.
66
The `Status` property is an indicator of completion independent of the API error handling.

src/RestSharp/IRestResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public interface IRestResponse
111111
/// Will contain only network transport or framework exceptions thrown during the request.
112112
/// HTTP protocol errors are handled by RestSharp and will not appear here.
113113
/// </remarks>
114-
Exception ErrorException { get; set; }
114+
Exception? ErrorException { get; set; }
115115

116116
/// <summary>
117117
/// The HTTP protocol version (1.0, 1.1, etc)

0 commit comments

Comments
 (0)