From 7cc4149bf22a3010a080ec5ff444097fd5c12650 Mon Sep 17 00:00:00 2001 From: Vedant Koditkar Date: Sat, 17 Jul 2021 15:18:05 +0530 Subject: [PATCH] Fix 'errorResponse' is null on at least one execution path. :bug: --- Src/Notion.Client/RestClient/RestClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Src/Notion.Client/RestClient/RestClient.cs b/Src/Notion.Client/RestClient/RestClient.cs index 3def9161..91428218 100644 --- a/Src/Notion.Client/RestClient/RestClient.cs +++ b/Src/Notion.Client/RestClient/RestClient.cs @@ -69,7 +69,7 @@ private static async Task BuildException(HttpResponseMessage response } } - return new NotionApiException(response.StatusCode, errorResponse?.ErrorCode, errorResponse.Message); + return new NotionApiException(response.StatusCode, errorResponse?.ErrorCode, errorResponse?.Message); } private async Task SendAsync(