Skip to content

Conversation

@tadelesh
Copy link
Member

@tadelesh tadelesh commented Dec 5, 2024

  1. add ranged status code support for exception
  2. move customized exception handling logic from error map to exception handling
  3. add _failsafe_deserialize function to provide fail saft deserialization for exception to support always return http response exception

fix: Azure/autorest.python#2937
fix: Azure/autorest.python#2940

@azure-sdk
Copy link
Collaborator

No changes needing a change description found.

@tadelesh tadelesh force-pushed the python_exception_handling branch from 29e3eca to 82e9b76 Compare December 5, 2024 08:19
@microsoft-github-policy-service microsoft-github-policy-service bot added emitter:client:python Issue for the Python client emitter: @typespec/http-client-python labels Dec 5, 2024
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

Copy link
Member

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this and the resultant generated code diff look good to me, thanks!

@tadelesh
Copy link
Member Author

tadelesh commented Dec 6, 2024

updated code change: Azure/autorest.python#2953

@tadelesh
Copy link
Member Author

tadelesh commented Dec 6, 2024

tested locally with todoapp. it works good.

@tadelesh tadelesh added this pull request to the merge queue Dec 6, 2024
Merged via the queue into main with commit 252b3df Dec 6, 2024
24 checks passed
@tadelesh tadelesh deleted the python_exception_handling branch December 6, 2024 10:18
archerzz pushed a commit to archerzz/typespec that referenced this pull request Dec 17, 2024
1. add ranged status code support for exception
2. move customized exception handling logic from error map to exception
handling
3. add `_failsafe_deserialize` function to provide fail saft
deserialization for exception to support always return http response
exception

fix: Azure/autorest.python#2937
fix: Azure/autorest.python#2940
github-merge-queue bot pushed a commit that referenced this pull request Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support status code range for errors Unbranded CodeGen should generate error models instead of reusing the model from core library

5 participants