1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

Log errors with full exception

This commit is contained in:
Kyle Spearrin 2016-06-21 23:55:21 -04:00
parent 0e6fd21805
commit afa37f5ab1

View File

@ -49,7 +49,8 @@ namespace Bit.Api.Utilities
else
{
var logger = context.HttpContext.RequestServices.GetRequiredService<ILogger<ExceptionHandlerFilterAttribute>>();
logger.LogError(exception.Message, exception);
logger.LogError(null, exception, exception.Message);
logger.LogError(null, exception, exception.Message);
errorModel.Message = "An unhandled server error has occured.";
context.HttpContext.Response.StatusCode = 500;