Open Closed

Configuring error responses for development environment in server logs #6870


User avatar
0
dev@veek.vn created

Hi,

Sometimes, the server returns the message 'An internal error occurred during your request!' and I need to open the log to check the error details. How can I set up the response to return the error message details and only for the development environment?

ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can configure the AbpExceptionHandlingOptions

    https://docs.abp.io/en/abp/latest/Exception-Handling#abpexceptionhandlingoptions

    if(env == ....)
    {
        Configure<AbpExceptionHandlingOptions>(options =>
        {
            options.SendExceptionsDetailsToClients = true;
            options.SendStackTraceToClients = true;
        });
    }
    
  • User Avatar
    0
    dev@veek.vn created

    yeah, thanks liangshiwei

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v9.3.0-preview. Updated on June 13, 2025, 11:37