Skip to content

Commit

Permalink
Change InnerException format
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva committed Jan 31, 2024
1 parent 883fac3 commit d458a23
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ public async ValueTask<bool> TryHandleAsync(HttpContext httpContext, Exception e

if (exception.InnerException is not null)
{
problemDetails.Extensions["innerException"] = exception.InnerException.GetType().FullName;
problemDetails.Extensions["innerExceptionMessage"] = exception.InnerException.Message;
problemDetails.Extensions["innerException"] = new
{
Title = exception.InnerException.GetType().FullName,
Detail = exception.InnerException.Message
};
}

if (webHostEnvironment.IsDevelopment())
Expand Down

0 comments on commit d458a23

Please sign in to comment.