Skip to content
This repository was archived by the owner on Sep 15, 2023. It is now read-only.

Commit aeb7656

Browse files
author
lmeinen
committed
don't ignore interruptedexception
1 parent 3da88e0 commit aeb7656

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

ch-covidcertificate-backend-verification-check/ch-covidcertificate-backend-verification-check-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verification/check/ws/config/SchedulingConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public SchedulingConfig(VerifierHelper verifierHelper) {
1616
}
1717

1818
@Scheduled(cron = "${trustlist.cron}")
19-
public void updateTrustList() {
19+
public void updateTrustList() throws InterruptedException {
2020
verifierHelper.updateTrustListConfig();
2121
}
2222
}

ch-covidcertificate-backend-verification-check/ch-covidcertificate-backend-verification-check-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verification/check/ws/controller/VerificationController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public VerificationController(TrustListConfig trustListConfig, VerifierHelper ve
5656

5757
@PostMapping(path = {"/verify"})
5858
public @ResponseBody ResponseEntity<VerificationResponse> verify(
59-
@RequestBody HCertPayload hCertPayload) {
59+
@RequestBody HCertPayload hCertPayload) throws InterruptedException {
6060
// Decode hcert
6161
final var decodeState = LibWrapper.decodeHCert(hCertPayload);
6262
DccHolder dccHolder;

ch-covidcertificate-backend-verification-check/ch-covidcertificate-backend-verification-check-ws/src/main/java/ch/admin/bag/covidcertificate/backend/verification/check/ws/util/VerifierHelper.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,19 @@ public VerifierHelper(
5656
}
5757

5858
// TODO: How to handle response failures?
59-
public void updateTrustListConfig() {
59+
public void updateTrustListConfig() throws InterruptedException {
6060
Jwks jwks = null;
6161
RevokedCertificates revokedCerts = null;
6262
RuleSet nationalRules = null;
6363
try {
6464
jwks = getDSCs();
6565
revokedCerts = getRevokedCerts();
6666
nationalRules = getNationalRules();
67-
} catch (URISyntaxException | InterruptedException | IOException e) {
67+
} catch (URISyntaxException | IOException e) {
6868
logger.error("TrustList update failed: {}", e.getMessage());
69+
} catch (InterruptedException e) {
70+
logger.error("TrustList update failed: {}", e.getMessage());
71+
throw e;
6972
}
7073
if (jwks != null && revokedCerts != null && nationalRules != null) {
7174
var trustList = new TrustList(jwks, revokedCerts, nationalRules);

0 commit comments

Comments
 (0)