From 7c855c5df8d91bb8f8845be8f3807ac0bf5eb624 Mon Sep 17 00:00:00 2001 From: Alexander Sapountzis Date: Fri, 13 Dec 2024 15:51:44 -0500 Subject: [PATCH] Address PR Comments --- src/identityApiClient.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/identityApiClient.ts b/src/identityApiClient.ts index 1d11d62b..2dcb4834 100644 --- a/src/identityApiClient.ts +++ b/src/identityApiClient.ts @@ -134,7 +134,11 @@ export default function IdentityAPIClient( // response.json will always exist on a fetch, but can only be // await-ed when the response is not empty, otherwise it will // throw an error. - aliasResponseBody = await response.json(); + try { + aliasResponseBody = await response.json(); + } catch (e) { + verbose('No response body for Alias request'); + } } else { // https://go.mparticle.com/work/SQDSDKS-6568 // XHRUploader returns the response as a string that we need to parse