You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(fetch): preserve Content-Type header for SDK requests on Node.js
The @sentry/api SDK constructs a Request object with Content-Type set, then
calls fetch(request) with no init argument. Our authenticatedFetch was reading
headers only from init?.headers, which is undefined in this case — resulting in
new Headers(undefined) (empty), losing the SDK's Content-Type. On Node.js,
fetch(request, {headers}) replaces the Request's headers per spec, so the
server received an empty Content-Type and returned HTTP 415.
Fix prepareHeaders to fall back to the Request object's headers when init is
undefined. Also correct method extraction for span tracing when called with
only a Request object.
Fixes CLI-65
0 commit comments