Skip to content

Use HttpResponseException in annotation-processor #45053

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

Merged
merged 10 commits into from
May 27, 2025

Conversation

samvaity
Copy link
Member

@samvaity samvaity commented Apr 21, 2025

Description

Closes #43728

Summary of patterns for status code + exception Mapping handling:

Case Map? Default? Example Generated Code
Only default error body type provided null Yes defaultErrorBodyType = ...; ...handleUnexpectedResponse(..., defaultErrorBodyType, null);
Only status-specific error body type provided Yes null statusToExceptionTypeMap = ...; ...handleUnexpectedResponse(..., null, statusToExceptionTypeMap);
Both Yes Yes statusToExceptionTypeMap = ...; defaultErrorBodyType = ...; ...handleUnexpectedResponse(..., defaultErrorBodyType, statusToExceptionTypeMap);
Neither null null ...handleUnexpectedResponse(..., null, null);

@azure-sdk
Copy link
Collaborator

azure-sdk commented Apr 22, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

io.clientcore:core

@samvaity samvaity force-pushed the exception-update branch 2 times, most recently from f401cea to ea9e072 Compare April 29, 2025 20:10
@samvaity samvaity requested a review from alzimmermsft April 29, 2025 22:13
@samvaity samvaity force-pushed the exception-update branch from f6c9d1a to 4802a3e Compare May 7, 2025 23:17
@samvaity samvaity marked this pull request as ready for review May 9, 2025 20:37
@samvaity samvaity force-pushed the exception-update branch 2 times, most recently from c81501f to 621b47a Compare May 9, 2025 23:35
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

io.clientcore:core

@samvaity samvaity force-pushed the exception-update branch from 4e30b29 to 6ac6f83 Compare May 19, 2025 22:33
@samvaity samvaity force-pushed the exception-update branch from 831d5a7 to d82f8d1 Compare May 21, 2025 23:38
@samvaity samvaity requested a review from alzimmermsft May 22, 2025 21:52
@samvaity samvaity force-pushed the exception-update branch from 5952c48 to 34650ff Compare May 22, 2025 22:10
@samvaity samvaity requested a review from alzimmermsft May 27, 2025 17:21
@samvaity samvaity merged commit e1b5d39 into Azure:main May 27, 2025
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Error Handling : annotation-processor
3 participants