How to get more detailed exception in ABP?

前端 未结 3 1703
北恋
北恋 2021-01-02 05:18

I created a CrudAppService. When I invoke its dynamic API by using swagger, I get a generic 500 error with this description:



        
3条回答
  •  隐瞒了意图╮
    2021-01-02 05:44

    You can simply send the exception details to the client by enabling one of ABP's configurations (SendAllExceptionsToClients) in ***.Web.Core Module, like this:

    public override void PreInitialize()
    {   
        Configuration.Modules.AbpWebCommon().SendAllExceptionsToClients = true;
    }
    

    Then you get the exception details on the client. Recommended only during development.

提交回复
热议问题