Skip to content

Commit a09370a

Browse files
committed
ref(browser): Add more specific mechanism.type to errors captured by httpClientIntegration
1 parent 8c1149b commit a09370a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/browser/src/integrations/httpclient.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function _fetchResponseHandler(
9393
requestCookies,
9494
responseCookies,
9595
error,
96+
type: 'fetch',
9697
});
9798

9899
captureEvent(event);
@@ -165,6 +166,7 @@ function _xhrResponseHandler(
165166
responseHeaders,
166167
responseCookies,
167168
error,
169+
type: 'xhr',
168170
});
169171

170172
captureEvent(event);
@@ -362,6 +364,7 @@ function _createEvent(data: {
362364
url: string;
363365
method: string;
364366
status: number;
367+
type: 'fetch' | 'xhr';
365368
responseHeaders?: Record<string, string>;
366369
responseCookies?: Record<string, string>;
367370
requestHeaders?: Record<string, string>;
@@ -402,7 +405,7 @@ function _createEvent(data: {
402405
};
403406

404407
addExceptionMechanism(event, {
405-
type: 'http.client',
408+
type: `http.client.${data.type}`,
406409
handled: false,
407410
});
408411

0 commit comments

Comments
 (0)