Removed state and ErrorResponse(Exception e) from BaseController. Added logging to catch part in Document and Envelope Controller.

This commit is contained in:
Developer 02
2024-05-16 09:23:33 +02:00
parent 68714c2937
commit ba723bdddb
6 changed files with 24 additions and 54 deletions

View File

@@ -41,7 +41,8 @@ namespace EnvelopeGenerator.Web.Controllers
}
catch(Exception ex)
{
return ErrorResponse(ex);
_logger.LogError(ex, "{Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
@@ -66,7 +67,8 @@ namespace EnvelopeGenerator.Web.Controllers
}
catch(Exception ex)
{
return ErrorResponse(ex);
_logger.LogError(ex, "{Message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError);
}
}