MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / makeRequest

Function makeRequest

packages/deno/src/transports/index.ts:25–48  ·  view source on GitHub ↗
(request: TransportRequest)

Source from the content-addressed store, hash-verified

23 });
24
25 function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {
26 const requestOptions: RequestInit = {
27 body: request.body,
28 method: 'POST',
29 referrerPolicy: 'strict-origin',
30 headers: options.headers,
31 };
32
33 try {
34 return suppressTracing(() => {
35 return fetch(options.url, requestOptions).then(response => {
36 return {
37 statusCode: response.status,
38 headers: {
39 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
40 'retry-after': response.headers.get('Retry-After'),
41 },
42 };
43 });
44 });
45 } catch (e) {
46 return Promise.reject(e);
47 }
48 }
49
50 return createTransport(options, makeRequest);
51}

Callers

nothing calls this directly

Calls 5

suppressTracingFunction · 0.90
rejectMethod · 0.80
getMethod · 0.65
fetchFunction · 0.50
thenMethod · 0.45

Tested by

no test coverage detected