Skip to content

Commit f513236

Browse files
Raul Hidalgo CaballeroSapphireBrand
andauthored
Check null of exception (#28)
Co-Authored-By: SapphireBrand <[email protected]>
1 parent ab66b7e commit f513236

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GraphQL.Client/Exceptions/GraphQLHttpException.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class GraphQLHttpException : Exception {
1717
/// Creates a new instance of <see cref="GraphQLHttpException"/>
1818
/// </summary>
1919
/// <param name="httpResponseMessage">The unexpected <see cref="System.Net.Http.HttpResponseMessage"/></param>
20-
public GraphQLHttpException(HttpResponseMessage httpResponseMessage) : base($"Unexpected {nameof(System.Net.Http.HttpResponseMessage)} with code: {httpResponseMessage.StatusCode}") {
20+
public GraphQLHttpException(HttpResponseMessage httpResponseMessage) : base($"Unexpected {nameof(System.Net.Http.HttpResponseMessage)} with code: {httpResponseMessage?.StatusCode}") {
2121
this.HttpResponseMessage = httpResponseMessage ?? throw new ArgumentNullException(nameof(httpResponseMessage));
2222
}
2323

0 commit comments

Comments
 (0)