Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #875 from bacongobbler/log-unhandled-exceptions
Browse files Browse the repository at this point in the history
log unhandled exceptions
  • Loading branch information
bacongobbler authored Jun 13, 2022
2 parents 76c2375 + ad4c613 commit a5a62b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Web/Filters/ApiExceptionFilterAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ private void HandleUnknownException(ExceptionContext context)
Title = "An error occurred while processing your request.",
Type = "https://tools.ietf.org/html/rfc7231#section-6.6.1"
};
#if DEBUG
details.Detail = $"{context.Exception.GetType().Name}: {context.Exception.Message}";
#endif

context.Result = new ObjectResult(details)
{
Expand Down

0 comments on commit a5a62b1

Please sign in to comment.