From 375b037a98bb3dcf20af1a37f7a02b0968cc01c0 Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Wed, 18 Sep 2024 12:40:16 -0400 Subject: [PATCH] fix: `response.data.errors` is sometimes empty (#577) Fix #536 --- src/wrap-request.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wrap-request.ts b/src/wrap-request.ts index f4f66a63..e9f1ccab 100644 --- a/src/wrap-request.ts +++ b/src/wrap-request.ts @@ -35,6 +35,7 @@ async function requestWithGraphqlErrorHandling( if ( response.data && response.data.errors && + response.data.errors.length > 0 && /Something went wrong while executing your query/.test( response.data.errors[0].message, )