diff --git a/src/ghs.ts b/src/ghs.ts index 056450d..fe37759 100644 --- a/src/ghs.ts +++ b/src/ghs.ts @@ -18,6 +18,10 @@ export async function request( ? await axios.default.get(url, config) : await axios.default.post(url, {query: query}, config); + if (response.errors) { + console.error(`API failure: ${response.errors[0].message}`); + process.exit(1); + } if (response.data.error) { console.error(`API failure: ${response.data.error}`); process.exit(1);