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

@@ -43,7 +43,8 @@ namespace EnvelopeGenerator.Web.Controllers
}
catch (Exception e)
{
return ErrorResponse(e);
_logger.LogError(e, "{Message}", e.Message);
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
@@ -88,7 +89,8 @@ namespace EnvelopeGenerator.Web.Controllers
}
catch (Exception e)
{
return ErrorResponse(e);
_logger.LogError(e, "{Message}", e.Message);
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
}