Skip to content

Commit 6b77c61

Browse files
committed
log when failing to convert string to array header
1 parent c9627af commit 6b77c61

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/node-core/src/utils/outgoingFetchRequest.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@sentry/core';
1111
import type { UndiciRequest, UndiciResponse } from '../integrations/node-fetch/types';
1212
import { mergeBaggageHeaders } from './baggage';
13-
13+
import { debug } from '@sentry/core';
1414
const SENTRY_TRACE_HEADER = 'sentry-trace';
1515
const SENTRY_BAGGAGE_HEADER = 'baggage';
1616
const W3C_TRACEPARENT_HEADER = 'traceparent';
@@ -104,7 +104,9 @@ function stringToArrayHeaders(requestHeaders: string): string[] {
104104
if (key) {
105105
headers.push(key, value);
106106
}
107-
} catch {}
107+
} catch {
108+
debug.warn(`Failed to convert string request header to array header: ${header}`);
109+
}
108110
}
109111
return headers;
110112
}

0 commit comments

Comments
 (0)