Skip to content

Commit

Permalink
fix: JSON parse error for non-JSON body in XMLHttpRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
anku255 committed Jun 10, 2024
1 parent 1966adb commit afc46a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bundle/bundle.js

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions lib/build/xmlhttprequest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions lib/ts/xmlhttprequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,7 @@ export function addInterceptorsToXMLHttpRequest() {
return await handleRetryPostRefreshing();
} else {
if (status === AuthHttpRequestFetch.config.invalidClaimStatusCode) {
await onInvalidClaimResponse({
data: JSON.parse(xhr.responseText)
});
await onInvalidClaimResponse({ data: xhr.responseText });
}
}
return true;
Expand Down

0 comments on commit afc46a2

Please sign in to comment.