Skip to content
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

V5 ODataError and ApiException do not expose the Response Headers (as ServiceException did in previous version) #1755

Closed
hesperanca opened this issue Mar 22, 2023 · 2 comments · Fixed by microsoftgraph/msgraph-sdk-dotnet-core#651

Comments

@hesperanca
Copy link

Describe the bug
In v4 we could access the ResponseHeaders via the ServiceException object. This was very useful when dealing with Throttling errors in batched requests (given that they are not handled by the SDK) because we could access the "retry-after" header to find out how long we should wait until trying again.

V5 uses the ODataError exception, which does not expose the response headers. So, if we get a throttling error, we have no way to get the value of the "retry-after" response header to find out how long we should wait before retrying.

Expected behaviour
I would expect the ODataError to expose the response header values (as we could do with the ServiceException in v4).

@ghost ghost added the Needs: Triage label Mar 22, 2023
@hesperanca hesperanca changed the title V5 ODataError and ApiException do not expose the Response Headers (as ServiceException did in v4) V5 ODataError and ApiException do not expose the Response Headers (as ServiceException did in previous version) Mar 22, 2023
@vadrsa
Copy link

vadrsa commented Apr 4, 2023

This is also a blocker for us to upgrade to V5, what are the plans for this enhancement?

@hesperanca
Copy link
Author

hesperanca commented Apr 4, 2023

@andrueastman - We had to go back to V4 because of this. Some timescales on a fix would be great.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants