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

Fix 3443 to set appropriate httpstatus codes and messages for different types of BlockException #3444

Open
wants to merge 10 commits into
base: 1.8
Choose a base branch
from

Conversation

Linzyoo
Copy link
Contributor

@Linzyoo Linzyoo commented Aug 24, 2024

Describe what this PR does / why we need it

This PR is to update DefaultExceptionHandler with appropriate httpstatus code and message for different types of BlockException.

Does this pull request fix one issue?

Fixes #3443

Describe how you did it

Create an enum for all BlockException and set appropriate httpstatus code and message.

Describe how to verify it

Add test cases for DefaultExceptionHandler

Special notes for reviews

# Conflicts:
#	sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/AbstractSentinelInterceptor.java
#	sentinel-demo/sentinel-demo-spring-webmvc/src/main/java/com/alibaba/csp/sentinel/demo/spring/webmvc/config/InterceptorConfig.java
2. improve based on review comments
@Linzyoo Linzyoo changed the title Fix 3443 Fix 3443 to set appropriate httpstatus codes and messages for different types of BlockException Aug 24, 2024
@LearningGp LearningGp self-requested a review August 29, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] DefaultBlockExceptionHandler treats all BlockException as FlowException
1 participant