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.

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


No answer yet!
Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09