From ebf7faca1b880160b31a4dc668a6ecdbd65de4bf Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Wed, 25 Sep 2024 02:01:42 +0000 Subject: [PATCH] catching error message from github that's in Json format --- packages/tool-cache/src/tool-cache.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/tool-cache/src/tool-cache.ts b/packages/tool-cache/src/tool-cache.ts index 694d12521e..a1ba4dfa13 100644 --- a/packages/tool-cache/src/tool-cache.ts +++ b/packages/tool-cache/src/tool-cache.ts @@ -627,8 +627,11 @@ export async function getManifestFromRepo( core.debug('Invalid json') } } - - return releases + if (!releases.hasOwnProperty('documentation_url')) { + return releases + } else { + throw new Error('github API rate limiting response in JSON format') + } } export async function findFromManifest(