-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Document workers I/O errors with examples #16965
base: production
Are you sure you want to change the base?
Document workers I/O errors with examples #16965
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 files reviewed, 3 outstanding issue(s) found.
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ so that we can ship, can always revisit and improve
export default { | ||
async fetch(request, env, ctx) { | ||
if (this.resp === undefined) { | ||
globalThis.resp = await fetch('https://example.com'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easier to understand by setting a global variable outside of the fetch handler? Since that is from what I've seen also the more common footgun, and illustrates the point of — don't do things in global scope outside of the handler!
Confirmed with @jasnell over chat to switch this to draft for now |
Summary
Screenshots (optional)
Documentation checklist