Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sentryTest(
type: 'Error',
value: 'HTTP Client Error with status code: 500',
mechanism: {
type: 'http.client',
type: 'auto.http.client.xhr',
handled: false,
},
stacktrace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ sentryTest(
type: 'Error',
value: 'HTTP Client Error with status code: 500',
mechanism: {
type: 'http.client',
type: 'auto.http.client.fetch',
handled: false,
},
stacktrace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sentryTest('works with a Request passed in', async ({ getLocalTestUrl, page }) =
type: 'Error',
value: 'HTTP Client Error with status code: 500',
mechanism: {
type: 'http.client',
type: 'auto.http.client.fetch',
handled: false,
},
stacktrace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sentryTest(
type: 'Error',
value: 'HTTP Client Error with status code: 500',
mechanism: {
type: 'http.client',
type: 'auto.http.client.fetch',
handled: false,
},
stacktrace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ sentryTest('works with a Request (without body) & options passed in', async ({ g
type: 'Error',
value: 'HTTP Client Error with status code: 500',
mechanism: {
type: 'http.client',
type: 'auto.http.client.fetch',
handled: false,
},
stacktrace: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sentryTest(
type: 'Error',
value: 'HTTP Client Error with status code: 500',
mechanism: {
type: 'http.client',
type: 'auto.http.client.xhr',
handled: false,
},
stacktrace: {
Expand Down
5 changes: 4 additions & 1 deletion packages/browser/src/integrations/httpclient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function _fetchResponseHandler(
requestCookies,
responseCookies,
error,
type: 'fetch',
});

captureEvent(event);
Expand Down Expand Up @@ -165,6 +166,7 @@ function _xhrResponseHandler(
responseHeaders,
responseCookies,
error,
type: 'xhr',
});

captureEvent(event);
Expand Down Expand Up @@ -362,6 +364,7 @@ function _createEvent(data: {
url: string;
method: string;
status: number;
type: 'fetch' | 'xhr';
responseHeaders?: Record<string, string>;
responseCookies?: Record<string, string>;
requestHeaders?: Record<string, string>;
Expand Down Expand Up @@ -402,7 +405,7 @@ function _createEvent(data: {
};

addExceptionMechanism(event, {
type: 'http.client',
type: `auto.http.client.${data.type}`,
handled: false,
});

Expand Down
Loading