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
16 changes: 7 additions & 9 deletions packages/browser/src/transports/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';
import { getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';

import { IS_DEBUG_BUILD } from '../flags';

Expand Down Expand Up @@ -98,13 +98,11 @@ export function sendReport(url: string, body: string): void {

if (supportsFetch()) {
const fetch = getNativeFetchImplementation();
return forget(
fetch(url, {
body,
method: 'POST',
credentials: 'omit',
keepalive: true,
}),
);
fetch(url, {
body,
method: 'POST',
credentials: 'omit',
keepalive: true,
}).then(null, error => logger.error(error));
}
}
9 changes: 5 additions & 4 deletions packages/node/src/integrations/utils/errorhandling.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getCurrentHub } from '@sentry/core';
import { forget, logger } from '@sentry/utils';
import { logger } from '@sentry/utils';

import { NodeClient } from '../../client';
import { IS_DEBUG_BUILD } from '../../flags';
Expand All @@ -24,12 +24,13 @@ export function logAndExitProcess(error: Error): void {
const timeout =
(options && options.shutdownTimeout && options.shutdownTimeout > 0 && options.shutdownTimeout) ||
DEFAULT_SHUTDOWN_TIMEOUT;
forget(
client.close(timeout).then((result: boolean) => {
client.close(timeout).then(
(result: boolean) => {
if (!result) {
IS_DEBUG_BUILD && logger.warn('We reached the timeout for emptying the request buffer, still exiting now!');
}
global.process.exit(1);
}),
},
error => logger.error(error),
);
}
12 changes: 0 additions & 12 deletions packages/utils/src/async.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/utils/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './async';
export * from './browser';
export * from './dsn';
export * from './error';
Expand Down
22 changes: 0 additions & 22 deletions packages/utils/test/async.test.ts

This file was deleted.