Some code cleanup
This commit is contained in:
parent
585e965a85
commit
d73bd22db2
34 changed files with 814 additions and 383 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue