This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user