-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
az rest response code #10714
Comments
Hi, |
It should at least show up when I use --debug |
Any update on this? I've just spend the past hour debugging a problem with trying to create an API and the source of the problem was that in the Swagger specification the property {
"error": {
"code": "ValidationError",
"message": "One or more fields contain incorrect values:",
"details": [{
"code": "ValidationError",
"target": "name",
"message": "API with specified name 'myApiName' already exists"
}
]
}
} Would've been nice if e: note that |
This issue is related to asynchronous operation, asynchronous execution will be adopted for some time-consuming operations. |
@jurgyy What do you expect to return? Is the location URL returned when you manually request to create the API or the ValidationError returned when you send a GET request for the second time? |
@zhoxing-ms Due to the asynchronous nature of the problem I'd suppose the location URL would suffice and let the end user decide what to do with it. But not returning anything is undesired behavior in my opinion. |
@jurgyy OK, I will submit a PR to fix it. After that, you can get information about the header by using |
We have changed the behavior in PR #12117 for
For including raw http information in the response body from |
Is your feature request related to a problem? Please describe.
Currently when making
put
orpatch
requests usingaz rest
it can be unclear whether the request is executed successfully. Unsuccessful execution returns an error, but there are certain commands that have multiple successful responses such as api create/update: codes 200, 201 and 202. In this case getting no returned value is confusing as to what has happened.Describe the solution you'd like
It would be nice if
az rest
was able to return those codes to ease the flow of scripts.Describe alternatives you've considered
In the current scenario I have to send a get request to check if everything is set as expected while this information is (sometimes) already present in the response header so perhaps return the header entirely.
The text was updated successfully, but these errors were encountered: