From 78db768bef8c5b18498e1651d45d85ace9bf87d8 Mon Sep 17 00:00:00 2001 From: Appu Goundan Date: Fri, 4 Aug 2023 13:40:52 -0400 Subject: [PATCH] Handle NubmerFormatException on rekor response Signed-off-by: Appu Goundan --- .../main/java/dev/sigstore/rekor/client/RekorResponse.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sigstore-java/src/main/java/dev/sigstore/rekor/client/RekorResponse.java b/sigstore-java/src/main/java/dev/sigstore/rekor/client/RekorResponse.java index 709eb4f9..7765a4b2 100644 --- a/sigstore-java/src/main/java/dev/sigstore/rekor/client/RekorResponse.java +++ b/sigstore-java/src/main/java/dev/sigstore/rekor/client/RekorResponse.java @@ -60,7 +60,10 @@ public static RekorResponse newRekorResponse(URI entryLocation, String rawRespon Map entryMap; try { entryMap = GSON.get().fromJson(rawResponse, type); - } catch (JsonSyntaxException | NullPointerException | StringIndexOutOfBoundsException ex) { + } catch (JsonSyntaxException + | NullPointerException + | NumberFormatException + | StringIndexOutOfBoundsException ex) { throw new RekorParseException("Rekor entry json could not be parsed: " + rawResponse, ex); } if (entryMap == null) {