Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

durable-objects: workers.md handler returns handleRooms() inside try without await, so rejections skip the catch

Open Beginner friendly
#246 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
documentation

Research direction

Read skills/durable-objects/references/workers.md, especially the Worker Handler Pattern at the cited lines. Update the two async handler returns inside the try block to await their promises, as suggested in the issue. Done when rejections from either handler reach the catch and produce its logged error and 500 response.

Written by the indexing model from the issue text.

Description

skills/durable-objects/references/workers.md (returns at lines 123 and 126
at 86505e44f87d801aa1864a3c4109e9a8ae5c409f), Worker Handler Pattern:

try {
  if (url.pathname.startsWith("/api/rooms")) {
    return handleRooms(request, env);
  }
  ...
} catch (error) {
  console.error("Request failed:", error);
  return new Response("Internal Server Error", { status: 500 });
}

handleRooms and handleUsers are async. Returning their promise without
await leaves the try block before the promise settles, so a rejection
never reaches the catch: no log line and no 500 response; the rejection
propagates out of fetch and the runtime's own error response is returned. The pattern teaches agents a try/catch
that does not guard what it appears to guard.

Suggested fix: return await handleRooms(request, env); and
return await handleUsers(request, env); (see the in-try-catch case of
https://typescript-eslint.io/rules/return-await/).

Read 2026-10-21.

Dominant language
Shell
Stars
3.1k
Forks
318
Avg merge
1d 13h
Merged PRs (30d)
26

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/skills

All issues in cloudflare/skills

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.