We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a7f6321 commit bdccf52Copy full SHA for bdccf52
packages/browser-utils/src/networkUtils.ts
@@ -60,7 +60,13 @@ export function getFetchRequestArgBody(fetchArgs: unknown[] = []): RequestInit['
60
* Extracted from replay internals to be reusable.
61
*/
62
export function parseXhrResponseHeaders(xhr: XMLHttpRequest): Record<string, string> {
63
- const headers = xhr.getAllResponseHeaders();
+ let headers: string | undefined;
64
+ try {
65
+ headers = xhr.getAllResponseHeaders();
66
+ } catch (error) {
67
+ DEBUG_BUILD && debug.exception(error, 'Failed to get xhr response headers');
68
+ return {};
69
+ }
70
71
if (!headers) {
72
return {};
0 commit comments