Skip to content
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

Python msrestazure: LRO doesn't deserialize 'target' and 'details' fields on error #1460

Closed
yugangw-msft opened this issue Sep 28, 2016 · 6 comments
Labels

Comments

@yugangw-msft
Copy link
Contributor

yugangw-msft commented Sep 28, 2016

C# and node versions both handle it. The consequence of not doing it is the error surfaced is too vague
Azure/azure-cli#1007
For reference, the C# version is here:
https://github.com/Azure/autorest/blob/master/src/client/Microsoft.Rest.ClientRuntime.Azure/CloudError.cs#L34-L39

@annatisch
Copy link
Member

Hi @yugangw-msft, are you able to confirm whether the response body returned by the webapp API conforms to the standard CloudError?
For example, I see that the C# implementation has Details as a list of CloudError objects, where as in the response Details has a list of key value pairs, only one of which is an "errorEntity".

@yugangw-msft
Copy link
Contributor Author

webapp API does not conform to the standard CloudError. So you don't need to special case for webapp api, rather just get de-serialization logic in parity with C# and node

I am chatting with webapp team to see whether their service can fix the error body

@annatisch
Copy link
Member

Thanks @yugangw-msft,
I think I've made some progress with this - one question - I notice that in the error response from webapp API in the CLI issue, all the fields are capitalized ("Code", "Message", etc).
Currently the CloudError deserialization in Python only looks for lower case fields. It appears from the node implementation that it may do so as well.
So - do you know if this should be completely case insensitive, or is this another formatting issue specific to the webapp API error response?

@yugangw-msft
Copy link
Contributor Author

It should be lower case always, so webapp, again, goes against the guideline :(. @naveedaz

@lmazuel
Copy link
Member

lmazuel commented Oct 17, 2016

Fixed here: #1510

Release soon

@lmazuel
Copy link
Member

lmazuel commented Oct 17, 2016

Released in msrestazure 0.4.4

@lmazuel lmazuel closed this as completed Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants