Closed provegard closed 3 years ago
@provegard thanks for reporting. We will migrate this project to .Net 5 first and fix this issue
Sounds good! I assume Autodesk.Forge and Autodesk.Forge.DesignAutomation will be migrated to .NET 5 as well? I use them both from a .NET 5 project, and while there are a lot of build/restore warnings, they work just fine.
By the way, if the error is 429 (too many requests), I'd like to read the Retry-After header, so it would be useful to have headers in the exception (or at least the Retry-After time).
Sounds good! I assume Autodesk.Forge and Autodesk.Forge.DesignAutomation will be migrated to .NET 5 as well?
That is right.
if the error is 429 (too many requests), I'd like to read the Retry-After header, so it would be useful to have headers in the exception (or at least the Retry-After time)
We will see what we can do for it
@provegard, the requests have been done by https://github.com/Autodesk-Forge/forge-api-dotnet-core/pull/71 and https://github.com/Autodesk-Forge/forge-api-dotnet-core/pull/72.
The changes are released with version of 2.0.1
(Autodesk.Forge.Core)
I am closing this issue. Please let us know if you have any question.
The
EnsureSuccessStatusCodeAsync
method doesn't setHttpRequestException.StatusCode
:https://github.com/Autodesk-Forge/forge-api-dotnet-core/blob/main/src/Autodesk.Forge.Core/HttpResponseMessageExtensions.cs#L41
The current workaround is to check if the message contains "status code N".