File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Src/Notion.Client/RestClient Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments