-
Notifications
You must be signed in to change notification settings - Fork 5.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
Revert "[SRP] Add default response status code" #8074
Merged
Merged
+0
−36
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This reverts commit f7475a7.
Azure Pipelines successfully started running 1 pipeline(s). |
1 similar comment
Azure Pipelines successfully started running 1 pipeline(s). |
weidongxu-microsoft
approved these changes
Jan 7, 2020
azure-sdk-for-js - Release
|
azure-sdk-for-go - Release
|
azure-sdk-for-net - Release
|
azure-sdk-for-java - Release
|
This was referenced Jan 7, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #8065
We need to revert #8065, since it will cause the display issue of the error responds, and is a breaking change to SDK.
We should not make it in until the display issue is fixed?
Or PSH upgrade to new SRP SDK will be blocked.
Such as for an error responds with StatusCode as
Conflict (409)
, and following content:Before the change, the exception will have the Error code and message in Exception.Body.code, and Exception.Message
• Exception.Response.StatusCode:
Conflict
• Exception.Body.code:
StorageDomainNameCouldNotVerify
• Exception.Message:
The custom domain name could not be verified. CNAME mapping from foo.example.com to any of sto1511.blob.core.windows.net,sto1511.z1.web.core.windows.net does not exist.
But after the change, no properties of the exception has the Error Code and Message, but only has the status code (a property has whole responds content, which is not friendly for user to read):
• Exception.Response.StatusCode:
Conflict
• Exception.Body.code:
null
• Exception.Message:
Operation returned an invalid status code 'Conflict'
So it’s difficult for user to know the failure reason, especially for Powershell (depends on .NET SRP SDK generated from swagger) since it will display the Exception.Message to console output.
After the change the Exception.Message can’t show the detail reason, so it’s difficult for powershell user to handle the failures.