Skip to content

Commit 717a67a

Browse files
author
Shaun Persad
authored
Update util.ts
1 parent 91690ef commit 717a67a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎cli/src/util.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ export async function handleCloudflareResponse(response: Response) {
205205
`Error response from ${response.url} (${response.status}): ${text}`,
206206
);
207207
}
208-
return JSON.parse(text);
208+
try {
209+
return JSON.parse(text);
210+
} catch {
211+
return null;
212+
}
209213
}
210214

211215
export type CommentOnPRConfig = {

0 commit comments

Comments
 (0)