Skip to content

WaitForOp should also error on Status Error #53

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

Closed
davidz627 opened this issue Jul 9, 2018 · 0 comments
Closed

WaitForOp should also error on Status Error #53

davidz627 opened this issue Jul 9, 2018 · 0 comments

Comments

@davidz627
Copy link
Contributor

For some operations the operation poll doesn't actually return an error but there is an error on the field on the op itself.

"You can see that a 200 OK was returned and the operation has status=DONE, but there's an "error" field on the operation you should be looking at.

So your code should probably look at pollOp.error in addition to err.

There are additional fields "httpErrorStatusCode" and "httpErrorMessage". Perhaps it should be 403 instead of 400, but that's a separate issue."

Kubernetes recently solved by:

if op.Error != nil && len(op.Error.Errors) > 0 && op.Error.Errors[0] != nil {
		e := op.Error.Errors[0]
		o.err = &GCEOperationError{HTTPStatusCode: op.HTTPStatusCode, Code: e.Code, Message: e.Message}
}
dobsonj pushed a commit to dobsonj/gcp-compute-persistent-disk-csi-driver that referenced this issue Dec 13, 2023
…ncy-openshift-4.16-ose-gcp-pd-csi-driver

OCPBUGS-24886: Updating ose-gcp-pd-csi-driver-container image to be consistent with ART
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant