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

Refactor IExceptionToErrorInfoConverter namespace and namings #15573

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

NecatiMeral
Copy link
Contributor

@NecatiMeral NecatiMeral commented Feb 1, 2023

Fixes #15557

Summary

Refactored IExceptionToErrorInfoConverter and related classes:

  • Changed namespace from Volo.Abp.AspNetCore.ExceptionHandling to Volo.Abp.ExceptionHandling
  • Renamed classes where appropriate
  • Renamed option properties
    • kept compatibility for now by using aliases for previous option names; can remove compatibility layer if wanted

Further considerations

We could inject IOptions<AbpExceptionHandlingOptions> into DefaultExceptionToErrorInfoConverter so the configured default values could be used. Currently every caller manually injects the options on the Convert method.

We could change the class like this:

    protected AbpExceptionLocalizationOptions LocalizationOptions { get; }

    public DefaultExceptionToErrorInfoConverter(
        IOptions<AbpExceptionLocalizationOptions> localizationOptions,
        IOptions<AbpExceptionHandlingOptions> handlingOptions,
        /* omitted for readability */
    )

    protected virtual AbpExceptionHandlingOptions CreateDefaultOptions()
    {
        return new AbpExceptionHandlingOptions
        {
            IncludeDetails = HandlingOptions.IncludeDetails,
            IncludeStackTrace = HandlingOptions.IncludeStackTrace
        };
    }

@NecatiMeral
Copy link
Contributor Author

The CI tests fail at permission-management efc. Can't explain why the test seems to be flaky.

@maliming maliming modified the milestones: 7.1-preview, 7.2-preview Feb 6, 2023
@hikalkan hikalkan modified the milestones: 7.2-preview, 7.3-preview Mar 22, 2023
@hikalkan hikalkan modified the milestones: 7.3-preview, 7.4-preview May 11, 2023
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


nm seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@hikalkan hikalkan modified the milestones: 7.4-preview, 8.0-preview Jun 4, 2023
@hikalkan hikalkan modified the milestones: 8.0-preview, backlog Aug 11, 2023
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.

Consider changing IExceptionToErrorInfoConverter namespace
5 participants