Identify client APIs that return null for the Value
of an operations returning Response<T>
#37905
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
MQ
This issue is part of a "milestone of quality" initiative.
Milestone
related customer issue: #35475
We should either make the return value of HasValue accurate or fix APIs that return null for
Value
against guidance.Notes taken from #35560:
Response<T>
, or are there others?Response<T>.HasValue
, and (b) where we could go in and add "correct" APIs and hide the ones that violate intended usage ofReponse<T>
.Response<T>.HasValue
to sometimes return false when it never did before. I agree it is unlikely that there is a customer dependency on this, but if someone had a loop that was checkingHasValue
and making decisions based on the presence of null, we would filter out items they were expecting and could change downstream behavior as a result. If the team decides the risk of this is sufficiently small, I will downgrade my concern to non-blocking, but wanted to make sure it was considered.Response<T>.Value
to null use a different static method onReponse
, e.g.Response.FromNull()
instead ofResponse.FromValue()
, and have that new static method return a different subtype ofResponse<T>
that changed the behavior ofHasValue
. I realize this implementation would have its own set of tradeoffs that may not be preferable to the current proposal.The text was updated successfully, but these errors were encountered: