-
Notifications
You must be signed in to change notification settings - Fork 14
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
No HTTP status code information returned if response body is empty #151
Comments
Hi @ashmrtn Is this something you'd be willing to submit a pull request for? |
Sorry, I got confused with another issue for a moment, transferred this issue again. |
No worries, keeping everything in order between the different repos is certainly a task in itself. Thanks for moving the issue to the proper place Unfortunately, I don't have the time right now to get a PR up for this. Looking a the golang library, it seems like a few more changes beyond the empty content check would be required since just returning Ideally the caller should get back something that allows inspecting the HTTP status code. I don't believe |
That's almost the case. Once get root parse node returns nil on a unsuccessful status code, it'd in fact go here |
see #152 |
Hi @ashmrtn |
ah, sorry, this sort of fell off my radar. I think it was fixed by #152 and can be closed? |
It does, sorry, I go confused reviewing a bunch of issues. I think we forgot to close this issue here, closing. |
My team and I have discovered some resources that take too long to return data for certain page sizes. These resources consistently result in 503 errors with no body content being sent back. The retries in the default graph client don't get us passed the 503s either. When using the
kiota-serialization-json-go
library and other graph SDK libraries to communicate with the Graph servers we only get an error of "content is empty" back from graph SDK in these situationsThis is problematic because we lose information about the HTTP status code. For example, we've found that if we see consistent 503s with no content returned we can reduce the requested page size to make progress. This strategy would probably not make sense if the status code was a 4xx error though
Would it be possible to update the graph SDK (I'm unsure which repo the update would be in) to somehow return the HTTP status code? We've worked around the issue for the moment by adding our own middleware to the graph client and explicitly checking for no content and returning an error, but that feels a bit heavy handed
As an additional note, depending on which graph SDK repo the fix is made in, other repos may need updating as well. For example, all the serialization libraries contain the line
errors.New("content is empty")
like I linked aboveThe text was updated successfully, but these errors were encountered: