Skip to content

Is it possible to output a warning "No Fetch API detected."? #16284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jihea-park opened this issue May 14, 2025 · 1 comment
Open

Is it possible to output a warning "No Fetch API detected."? #16284

jihea-park opened this issue May 14, 2025 · 1 comment

Comments

@jihea-park
Copy link

Description

https://github.com/getsentry/sentry-javascript/blob/develop/packages/browser/src/sdk.ts#L190

I am studying sentry/browser code.

Initially, logger.enabled is set to false.

In the initAndBind function of sentry/core, logger.enable() is called, and the logger is enabled from then on.

However, logger.warn('No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill.',); exists above the initAndBind function.

Is it possible to output a warning "No Fetch API detected."?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 May 14, 2025
Copy link
Member

mydea commented May 14, 2025

We do not officially support any environments where fetch is not supported. Why would you need/want such a warning? Do you expect this to not be supported somewhere? I was actually thinking about removing this warning all together 🤔 (as this will trigger a warning/error/log anyhow once the SDK tries to send something to sentry and encounters fetch not existing)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants