Workers SDK Issue Reports

← Back to Dashboard

#7563 Exporting a class with static async fetch method shows no error

Recommendation:KEEP OPEN
Difficulty:easy
Reasoning:

Maintainer (kentonv) acknowledged the actual bug: silent 404 failure instead of proper error message. Static fetch not supported by design, but missing error is a legitimate bug.

Suggested Action:

Keep open for error messaging improvement implementation

Analysis Report

Issue Review: cloudflare/workers-sdk#7563

Summary

Exporting a class with a static async fetch method silently fails with 404 instead of showing a proper error message.

Findings

  • Created: 2024-11-27
  • Updated: 2025-10-30
  • Version: 3.89.0 (Wrangler) → 4.60.0 (current)
  • Component: Workers Runtime / Wrangler
  • Labels: bug, error-messaging
  • Comments: 1

Key Evidence

  • Maintainer Response (kentonv): Confirmed this is by design - when a class is exported, the system interprets it as an entrypoint class (Durable Object or WorkerEntrypoint), which requires instantiation. Supporting static methods would add complexity, so the recommendation is "Don't do this."

  • Acknowledged Bug: The maintainer acknowledged the actual bug is the lack of a proper error message. The system should refuse deployment or show an error instead of silently returning 404.

  • No Fix Found: No merged PRs or changelog entries reference this issue. The error messaging improvement has not been implemented.

  • Labels Appropriate: The error-messaging label correctly identifies this as an error messaging improvement issue.

Recommendation

Status: KEEP OPEN

Reasoning: A Cloudflare maintainer (kentonv) explicitly acknowledged the bug - the lack of a proper error message when exporting a class with static fetch method. While the behavior (not supporting static fetch) is by design, the silent 404 failure is a legitimate bug that needs fixing. The issue is appropriately labeled with error-messaging.

Action: Keep open until proper error messaging is implemented. Consider adding a help-wanted or good-first-issue label if this is a suitable contribution opportunity.

Suggested Comment

N/A - No comment needed. The issue is correctly triaged and awaiting implementation.

Notes & Feedback (0)

No notes yet.

Add Note