8000 fix lgtm alerts by KoditkarVedant · Pull Request #316 · notion-dotnet/notion-sdk-net · GitHub
[go: up one dir, main page]

Skip to content

fix lgtm alerts #316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Src/Notion.Client/RestClient/RestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ private static async Task<Exception> BuildException(HttpResponseMessage response
{
errorResponse = JsonConvert.DeserializeObject<NotionApiErrorResponse>(errorBody);
}
catch
catch (Exception ex)
{
Log.Error(ex, "Error when parsing the notion api response.");
}
}

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

requestUri = AddQueryString(requestUri, queryParams);

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

Expand Down
0