diff --git a/ch-covidcertificate-backend-transformation/ch-covidcertificate-backend-transformation-ws/src/main/java/ch/admin/bag/covidcertificate/backend/transformation/ws/client/VerificationCheckClient.java b/ch-covidcertificate-backend-transformation/ch-covidcertificate-backend-transformation-ws/src/main/java/ch/admin/bag/covidcertificate/backend/transformation/ws/client/VerificationCheckClient.java index 0a198e0..1f68db2 100644 --- a/ch-covidcertificate-backend-transformation/ch-covidcertificate-backend-transformation-ws/src/main/java/ch/admin/bag/covidcertificate/backend/transformation/ws/client/VerificationCheckClient.java +++ b/ch-covidcertificate-backend-transformation/ch-covidcertificate-backend-transformation-ws/src/main/java/ch/admin/bag/covidcertificate/backend/transformation/ws/client/VerificationCheckClient.java @@ -46,13 +46,13 @@ private VerificationResponse verify(HCertPayload hCertPayload) { .POST(BodyPublishers.ofString(hCert)) .build(); final HttpResponse response = httpClient.send(request, BodyHandlers.ofString()); - if (response.statusCode() != 400) { + if (response.statusCode() == 400) { logger.info("Certificate couldn't be decoded."); return null; } return objectMapper.readValue(response.body(), VerificationResponse.class); } catch (URISyntaxException | IOException | InterruptedException e) { - logger.error("Couldn't verify certificate"); + logger.error("Couldn't verify certificate", e); return null; } }