New Generic Poller doesn't correctly handle case where Poll request succeeds, but with failed state #18581
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Bug Report
I was specifically testing with
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.1-0.20220609210213-3e53bd32358a
but I think any current version ofPoller[T]
will have this issue.This shows up most obviously as a change in behavior of the
Poll
function of thePoller[T]
. In the old, non-generic implementation, aPoll
that recieved a valid HTTP response (HTTP status code 200), but whose contents contained aFailed
state with an error, would classify that as anerror
in Golang and return theerror
to the caller ofPoll
. You can see this here, the snippet fromPoll
is:Now though, if the
Poller[T]
has a successful response such as:This is not classified as an
error
andPoll
doesn't return anerror
. As far as I can tell in the currentPoller[T]
impl, there is no equivalent "if failed" check. See the code.The text was updated successfully, but these errors were encountered: