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

Only set specific type of exception's data to errorInfo.Data. #20812

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

maliming
Copy link
Member

Resolve #20811

@maliming maliming added this to the 9.0-preview milestone Sep 17, 2024
Comment on lines 332 to 336
SendStackTraceToClients = true,
SendExceptionDataToClientTypes =
{
typeof(IBusinessException)
}
Copy link
Member

Choose a reason for hiding this comment

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

We should also pass the SendExceptionDataToClientTypes parameter to the Convert method calls. Otherwise, we can't configure the default option as intended, since CreateDefaultOptions method only adds the IBusinessException interface.

Current services that use this option: AbpExceptionHandlingMiddleware, UserExceptionInformer, AbpExceptionFilter, AbpExceptionPageFilter, and ErrorController.

Copy link
Member Author

Choose a reason for hiding this comment

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

@ahmetfarukulu ahmetfarukulu merged commit d75d34c into dev Sep 17, 2024
2 of 3 checks passed
@ahmetfarukulu ahmetfarukulu deleted the SendExceptionDataToClientTypes branch September 17, 2024 12:02
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.

Only set specific type of exception's data to errorInfo.Data.
2 participants