WellFinalDocumentsService.ReNotifyPublishersAsync replace exception type by argumentInvalid

This commit is contained in:
ngfrolov 2023-01-17 15:40:49 +05:00
parent 07f77f83d8
commit fa6fdc067e
Signed by: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -204,7 +204,7 @@ namespace AsbCloudInfrastructure.Services
}));
if(!docs.Any())
throw new Exception("Нет такой категории, или в нее уже загружен документ");
throw new ArgumentInvalidException("Нет такой категории, или в нее уже загружен документ", nameof(idCategory));
var message = requester.MakeDisplayName() + " ожидает от Вас загрузку на портал документа «{{0}}»";
await GenerateMessageAsync(docs, message, token);