cosmosdb | Consistent StatusCodes.NotFound handling for Item.ts operations #23489
Labels
Client
This issue points to a problem in the data-plane of the library.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
feature-request
This issue requires a new behavior in the product in order be resolved.
Milestone
Is your feature request related to a problem? Please describe.
read
inItem.ts
does not throw an error forStatusCodes.NotFound
, but the other operations (e.g.delete
) do. This is frustrating because:StatusCodes.NotFound
is caused by this line where the error is caught and not thrown forread
, and the error is instead is returned as the response.Describe the solution you'd like
read
and the other operations to have a consistent way of handling errors fromClientContext
, or at least just forStatusCodes.NotFound
Describe alternatives you've considered
StatusCodes.NotFound
so that it is clear for developersAdditional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: