Skip to content

Commit 260c546

Browse files
fix lgtm alerts
1 parent cf1e4ee commit 260c546

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Src/Notion.Client/RestClient/RestClient.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ private static async Task<Exception> BuildException(HttpResponseMessage response
6464
{
6565
errorResponse = JsonConvert.DeserializeObject<NotionApiErrorResponse>(errorBody);
6666
}
67-
catch
67+
catch (Exception ex)
6868
{
69+
Log.Error(ex, "Error when parsing the notion api response.");
6970
}
7071
}
7172

@@ -84,7 +85,7 @@ public async Task<HttpResponseMessage> SendAsync(
8485

8586
requestUri = AddQueryString(requestUri, queryParams);
8687

87-
HttpRequestMessage httpRequest = new HttpRequestMessage(httpMethod, requestUri);
88+
using var httpRequest = new HttpRequestMessage(httpMethod, requestUri);
8889
httpRequest.Headers.Authorization = new AuthenticationHeaderValue("Bearer", _options.AuthToken);
8990
httpRequest.Headers.Add("Notion-Version", _options.NotionVersion);
9091

0 commit comments

Comments
 (0)