autorest icon indicating copy to clipboard operation
autorest copied to clipboard

[Python.Azure] CloudError failed to get error message from response.

Open haocs opened this issue 10 years ago • 3 comments

CloudError class in msrestazure retrieves error message from raw server response by calling _build_error_message()

It won't work if "message" attribute starts with M(dict.get() is case sensitive in python). I run into this issue when I made insights requests. And the raw response from server is

'{"Code":"ResourceNotSupported","Message":"Resource provider not supported: microsoft.web"}'

However, error message from CloudError is

Operation failed with status: 'Bad Request'. Details: 400 Client Error: Bad Request for url: https://management.azure.com/subscriptions/***/resourceGroups/***/providers/Microsoft.Web/sites/***

haocs avatar Oct 07 '16 23:10 haocs

@lmazuel Any ideas?

fearthecowboy avatar Oct 20 '16 14:10 fearthecowboy

@lmazuel -- is this still an issue? If so, please reopen.

olydis avatar Jul 17 '17 20:07 olydis

@olydis I honestly don't know, let's keep this close and see if someone complains :p

lmazuel avatar Jul 17 '17 20:07 lmazuel