RED-575: Error 500 if trying add-to-dictionary for a type/dictionary that does not exist

This commit is contained in:
aoezyetimoglu 2021-12-14 16:08:41 +01:00
parent 8a7362a0b2
commit afc89e3773

View File

@ -79,10 +79,8 @@ public class ManualRedactionService {
}
dictionaryController.getDictionaryForType(addRedactionRequest.getTypeId());
} catch (FeignException e) {
if (e.status() == 404) {
} catch (NotFoundException e) {
throw new BadRequestException("Invalid type: " + addRedactionRequest.getTypeId());
}
}
}