-
Notifications
You must be signed in to change notification settings - Fork 838
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
Handling of API Errors in the SDK #748
Comments
Just to add another example to this, I believe we’ve also seeing this from the CosmosDB SDK (but I don’t have a sample to hand) |
Just found another example for this - when updating an App Service (which, coincidently I think the Swagger's broken for - but I'll file a separate issue on the Rest API Specs repository about that 😄) Response:
Error:
Hope that helps :) |
hey @jhendrixMSFT Just checking in - we're still seeing this in SDK 11.1 and AutoRest 9.4.1 for the Container Service SDK (issue) - is there a rough timeline for when this will be fixed? :) Thanks! |
Hello @tombuildsstuff sorry this has languished a bit. I will try to dig into this in the next few days, if it ends up being an easy fix we can roll it into v12. |
OK I looked into this and using your example for SQL this is fixed in the upcoming v12 SDK. Here's the output I get in a test program I wrote.
The output is a little wonky due to how we wrap exceptions (something I'd like to eventually clean up) but you can actually get the underlying issue which is good. |
@jhendrixMSFT that's great news - thanks for looking into this :) |
This should be resolved in v12, please re-open if you still experience this issue. |
@jhendrixMSFT @tombuildsstuff i am still seeing this issue when trying to update an appservice, exactly like tom showed above! |
I am seeing this error when attempting to update an existing App Service Plan, but the scenario seems to arise when you have multiple ways of updating the App Service using Terraform and each has its state file. |
@sjwaight @pixelicous just to let you know that the App Service errors are related to a bug in the App Service API's (which is being tracked here) - and not related to the SDK / this issue (which has been resolved). |
@tombuildsstuff thanks mate.. ill take a look |
Howdy folks, seeing as we've confirmed this issue as resolved and it's still triggering response, I'm going to lock the conversation. If you believe you're running into a related issue, and don't find the guidance you need in the issue @tombuildsstuff linked above, please open a new issue in this repository. |
👋
I've been meaning to raise this one for a while.. in this case I'm using the SQL Databases SDK - however this also applies to CosmosDB Accounts and I believe Container Service (amongst other services) too.
When making the following request using the SQL Databases SDK with an invalid configuration:
which returns the response from the API:
When checking the error response from the SDK for this call, the error returned is:
Whilst it's possible to deserialise the response in each case and parse out the error message; it feels like something the SDK should be doing. As such would it make sense for the SDK to automatically check for and parse an error response if it's not a successful status code and append that to the error message (which in it's current form isn't particularly helpful)? In addition - it seems odd that the
code
isUnknown
whenBadRequest
is being returned from the API?@marstr @mcardosos what do you think? :)
Thanks!
The text was updated successfully, but these errors were encountered: