-
Notifications
You must be signed in to change notification settings - Fork 175
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
Operation error not handled correctly by a long-running operation #634
Comments
It's been 6+ months. Can somebody change the 2xx response to a 4xx? this mysterious error is really confusing to end users |
Another example of the same issue with storage accounts: pulumi/pulumi-azure-native#1138 (comment) @jhendrixMSFT sorry for tagging directly, but could you take a look? |
Sorry for the delay. Do you have an example of how you're using Also, we will be deprecating |
We basically do this: resp, err = autorest.SendWithSender(
k.client,
prepReq,
azure.DoRetryWithRegistration(k.client),
)
if err != nil {
return nil, false, err
}
future, err := azure.NewFutureFromResponse(resp)
if err != nil {
return nil, created, err
}
err = future.WaitForCompletionRef(ctx, k.client)
if err != nil {
return nil, created, err
}
resp, err = future.GetResult(k.client)
if err != nil {
return nil, created, err
} Is that what you were asking? |
Thanks this is helpful. I believe that the service is in error here, not following the Azure RPC spec. I will follow up on this, but it means that there's no good workaround at present other than writing a custom future/poller to handle this case. :( |
What's the exact violation here? Would it be a bad idea to relax the library and handle these cases? They seem to be coming from multiple Azure services - see linked issues.
Do you have an example of this anywhere? Would |
In this case, based on the terminal response, I believe that the initial response to the PUT should have returned the polling URL in the |
Issue has been reported to the service team. I'll post when I have more info. |
@jhendrixMSFT any update on this? |
According to the service team, this was fixed in API version |
I've just tried with 2021-04-01 and got exactly the same issue, unfortunately |
I'm using
go-autorest
to provision a long running resource underAzureActiveDirectory
. It fails but the error message is swallowed and a faulty error message is returned.Here is an example.
The initial PUT operation returns a 202 with the link to the operation:
The operation returns a 200 with an error message:
However,
go-autorest
then proceeds to query the resource which doesn't exist:This last error is returned as a Go error, which confuses our users.
The text was updated successfully, but these errors were encountered: