Base solution for your next web application
Open Closed

Error Handling and Exception Handler #1303


User avatar
0
guillaumej created

Hello,

I'm using the Dynamic Web Api, and checking it using SwaggerUI.

I have one working service, and two not working : error code 500 : "{ "message": "An error has occurred." }"

My problem is I don't know how to get more information

  • the ABP log is not showing anything anything related EDITED : The exception handler is working, it's just it's not an unhandled exception - of course !

To be clear, I don't want the fix to my error (i'm sure it's something stupid), but I'm very interested in accessing the real error message, rather than "an error has occured".

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    guillaumej created

    I fixed my problem, but I'm not sure how I could have got the real error.

    Also, I use DontWrapResult on my service.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    hikalkan created
    Support Team

    Have you tried to make customErrors="Off" in your web.config? If so, ABP does not handle any exception and you can get the raw error.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    guillaumej created

    Okay, testing further, my error was so "uncommon" (it was a Castle Core injection error because I forgot a IDomainService) that I think normal ABP error handling was not yet activted

    I tested on a more "normal" scenario, and if I got a "Internal server error" as a response, the logs are filled correctly.

    Sorry !

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)