From fee24a83ad6cb1a3e243f679e43255668009ae69 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 25 Jan 2022 08:25:16 +0000 Subject: [PATCH] Fix JSON content missing from handled API errors --- packages/frontend-core/src/api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend-core/src/api/index.js b/packages/frontend-core/src/api/index.js index a2cd62f16a..469dbfa0d4 100644 --- a/packages/frontend-core/src/api/index.js +++ b/packages/frontend-core/src/api/index.js @@ -45,7 +45,7 @@ export const createAPIClient = config => { let message = response.statusText let json = null try { - const json = await response.json() + json = await response.json() if (json?.message) { message = json.message } else if (json?.error) {