Skip to content

Commit 7c855c5

Browse files
Address PR Comments
1 parent 39d6fe4 commit 7c855c5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/identityApiClient.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,11 @@ export default function IdentityAPIClient(
134134
// response.json will always exist on a fetch, but can only be
135135
// await-ed when the response is not empty, otherwise it will
136136
// throw an error.
137-
aliasResponseBody = await response.json();
137+
try {
138+
aliasResponseBody = await response.json();
139+
} catch (e) {
140+
verbose('No response body for Alias request');
141+
}
138142
} else {
139143
// https://go.mparticle.com/work/SQDSDKS-6568
140144
// XHRUploader returns the response as a string that we need to parse

0 commit comments

Comments
 (0)