proudmonkey / AutoWrapper

A simple, yet customizable global exception handler and Http response wrapper for ASP.NET Core APIs.
MIT License
679 stars 82 forks source link

serialize exception and inner exception #99

Open hosseinRezaei188 opened 3 years ago

hosseinRezaei188 commented 3 years ago

Entity framework inner exception not shown. inner exception is useful. last version of autowrapper show exception like:

"errors": { "$id": "2", "message": "An error occurred while updating the entries. See the inner exception for details.", "type": "ApiException", "raw": " ..........g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)\n at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)\n at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)\n at AutoWrapper.Base.WrapperBase.InvokeAsyncBase(HttpContext context, AutoWrapperMembers awm)" }, "validationErrors": null, "details": null, "type": "https://httpstatuses.com/500", "title": "Internal Server Error", "status": 500, "detail": "An error occurred while updating the entries. See the inner exception for details.", }