Some code cleanup

This commit is contained in:
Joseph Milazzo 2021-03-22 16:38:51 -05:00
parent 585e965a85
commit d73bd22db2
34 changed files with 814 additions and 383 deletions

View file

@ -25,14 +25,13 @@ namespace API.Middleware
public async Task InvokeAsync(HttpContext context)
{
// BUG: I think Hangfire timeouts are triggering the middleware to hijack an API call
try
{
await _next(context); // downstream middlewares or http call
}
catch (Exception ex)
{
_logger.LogError(ex, ex.Message);
_logger.LogError(ex, "There was an exception");
context.Response.ContentType = "application/json";
context.Response.StatusCode = (int) HttpStatusCode.InternalServerError;