Open Closed

Exception details not logged with BusinessException and UserFriendlyException #2915


User avatar
0
scott7106 created

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.1.4

  • UI type: Angular (not relevant to issue)

  • DB provider: EF Core (not relevant to issue)

  • Tiered (MVC) or Identity Server Separated (Angular): no

I have an exception which occurs attempting to connect to a 3rd party API. When this happens, I want to throw a UserFriendlyException so that I can let the user know that something went wrong and log the details to the log files.

if (response.IsError)
{
    throw new BusinessException(
        message: L[ZiplineDomainErrorCodes.ConnectionError],
        details: response.ErrorDescription,
        logLevel: LogLevel.Error);
}

When this error is thrown, the error is logged to the log files as expected. However, the details field is logged as null. This issue occurs with both the UserFriendlyException and the BusinessException classes.

image.png

Is there a way to include details in the log file for these exceptions? Is this a bug?


No answer yet!
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.2.0-preview. Updated on March 13, 2025, 04:08