Skip to content

Commit e2523ed

Browse files
authored
fixed access to possible null object RequestMessage (#1989)
1 parent 8fdbb44 commit e2523ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/RestSharp/Response/RestResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async Task<RestResponse> GetDefaultResponse() {
9090
ContentType = httpResponse.Content.Headers.ContentType?.MediaType,
9191
ResponseStatus = calculateResponseStatus(httpResponse),
9292
ErrorException = httpResponse.MaybeException(),
93-
ResponseUri = httpResponse.RequestMessage!.RequestUri,
93+
ResponseUri = httpResponse.RequestMessage?.RequestUri,
9494
Server = httpResponse.Headers.Server.ToString(),
9595
StatusCode = httpResponse.StatusCode,
9696
StatusDescription = httpResponse.ReasonPhrase,

0 commit comments

Comments
 (0)