in src/main/java/com/epam/digital/data/platform/kafkaapi/core/service/DigitalSignatureService.java [81:98]
private String getSignature(String key) {
try {
log.info("Reading Signature from Ceph by key '{}'", key);
return
datafactoryCephService
.getAsString(cephBucketName, key)
.orElseThrow(() -> new ExternalCommunicationException(
String.format("Digital signature does not found in ceph. Signature key: %s", key),
Status.INTERNAL_CONTRACT_VIOLATION)
);
} catch (CephCommunicationException e) {
var message = String.format("Exception while communication with ceph: %s", e.getMessage());
throw new ExternalCommunicationException(message, e, Status.THIRD_PARTY_SERVICE_UNAVAILABLE);
} catch (MisconfigurationException e) {
var message = String.format("Incorrect Ceph configuration: %s", e.getMessage());
throw new ExternalCommunicationException(message, e, Status.INTERNAL_CONTRACT_VIOLATION);
}
}