This commit is contained in:
2020-07-21 22:01:54 +00:00
parent 336046b1d7
commit 3c650ba980
3 changed files with 17 additions and 8 deletions

View File

@@ -80,6 +80,8 @@ namespace AyaNova.Api.ControllerHelpers
if (loggableError)
log.LogError(context.Exception, "Error");
//Notify ops notification issue
NotifyEventProcessor.AddOpsProblemEvent("Server API internal error, see log for more details", context.Exception).Forget();//.Wait();
HttpResponse response = context.HttpContext.Response;
response.StatusCode = (int)status;
@@ -87,7 +89,7 @@ namespace AyaNova.Api.ControllerHelpers
//This line is critical, without it the response is not proper and fails in various clients (postman, xunit tests with httpclient)
context.ExceptionHandled = true;
response.WriteAsync(JsonConvert.SerializeObject(
new ApiErrorResponse(ApiErrorCode.API_SERVER_ERROR, "Server internal error", "See server log for details"),