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:
parent
0e6fd21805
commit
afa37f5ab1
@ -49,7 +49,8 @@ namespace Bit.Api.Utilities
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
var logger = context.HttpContext.RequestServices.GetRequiredService<ILogger<ExceptionHandlerFilterAttribute>>();
|
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.";
|
errorModel.Message = "An unhandled server error has occured.";
|
||||||
context.HttpContext.Response.StatusCode = 500;
|
context.HttpContext.Response.StatusCode = 500;
|
||||||
|
Loading…
Reference in New Issue
Block a user