This commit is contained in:
2020-07-21 19:32:50 +00:00
parent f94a4f4223
commit 336046b1d7
8 changed files with 39 additions and 32 deletions

View File

@@ -576,13 +576,12 @@ namespace AyaNova.Api.Controllers
var filePath = FileUtil.GetPermanentAttachmentFilePath(dbObject.StoredFileName);
if (!System.IO.File.Exists(filePath))
{
//TODO: notify OPSNOTIFY
//TODO: notify this should trigger some kind of notification to the ops people
//and a red light on the dashboard
//TODO: this should reset the validity
var errText = $"Physical file {dbObject.StoredFileName} not found despite attachment record, this file is missing";
log.LogError(errText);
await NotifyEventProcessor.AddOpsProblemEvent($"File attachment issue: {errText}");
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND, null, errText));
}