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

Document ReadItemAysnc item not found behavior #4394

Open
jcocchi opened this issue Apr 8, 2024 · 1 comment
Open

Document ReadItemAysnc item not found behavior #4394

jcocchi opened this issue Apr 8, 2024 · 1 comment

Comments

@jcocchi
Copy link
Contributor

jcocchi commented Apr 8, 2024

ReadItemAsync throws a 404 exception when an item isn't found, but this isn't clearly called out in the API reference docs. While we don't duplicate the full set of potential error codes for every API, common codes should be covered for expected, mainline scenarios.

Add a remark and example for the item not found case. Additionally, mention that ReadItemStreamAsync can be used for exception-less flows.

Additional context
There has been much discussion on this topic across several issues including #692, #1264 and others.

@bartelink
Copy link
Contributor

bartelink commented Apr 20, 2024

Thanks for logging this; it'd definitely be valuable to have it addressed. (aside that I'll remove when it's gone.... typo in title!)

Please also consider resolving this in the arguably more natural and direct way (as I plead for here) by adding an actual TryGetItem API that the average developer that doesn't read the docs will naturally arrive at in the course of navigating the API set, rather than ending up doing some very indirect things, and needing people to point out concepts that don't have APIs as a navigation affordance that one can more directly refer to.

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

No branches or pull requests

3 participants