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
64
64
{
65
65
errorResponse = JsonConvert . DeserializeObject < NotionApiErrorResponse > ( errorBody ) ;
66
66
}
67
- catch
67
+ catch ( Exception ex )
68
68
{
69
+ Log . Error ( ex , "Error when parsing the notion api response." ) ;
69
70
}
70
71
}
71
72
@@ -84,7 +85,7 @@ public async Task<HttpResponseMessage> SendAsync(
84
85
85
86
requestUri = AddQueryString ( requestUri , queryParams ) ;
86
87
87
- HttpRequestMessage httpRequest = new HttpRequestMessage ( httpMethod , requestUri ) ;
88
+ using var httpRequest = new HttpRequestMessage ( httpMethod , requestUri ) ;
88
89
httpRequest . Headers . Authorization = new AuthenticationHeaderValue ( "Bearer" , _options . AuthToken ) ;
89
90
httpRequest . Headers . Add ( "Notion-Version" , _options . NotionVersion ) ;
90
91
You can’t perform that action at this time.
0 commit comments