Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 55e27a6

Browse files
Merge pull request #316 from notion-dotnet/fix-lgtm-alerts
fix lgtm alerts
2 parents cf1e4ee + 260c546 commit 55e27a6

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(Exceptionex)
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+
usingvar 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)

AltStyle によって変換されたページ (->オリジナル) /