durable-objects: workers.md handler returns handleRooms() inside try without await, so rejections skip the catch
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
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/skills
-
workers-best-practices: runtime-patterns.md gives CPU limits under retired plan names (Bundled, Standard/Unbound)Possibly taken @ayushkrsingh946 claimed this 2 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cloudflare/skills#247 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cloudflare/skills#245 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
cloudflare/skills#86 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
cloudflare/skills#11 · 3 comments ·
Maintainers usually reply within 1 day
-
ID к Velvet VPNPossibly taken @ayushkrsingh946 claimed this 2 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 30/100
cloudflare/skills#244 · 1 comment ·
Maintainers usually reply within 1 day
All issues in cloudflare/skills
Similar issues
-
patch: moving an executable script removes its executable bitPossibly taken @chenyb999-zhcn claimed this today. Openreproduced
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anomalyco/opencode#58651 · 2 comments ·
Maintainers usually reply within 1 day
-
`ODK_RESOURCES_DIR` not set when `ODK_USER_ID` is 0 or unsetPossibly taken @gouttegd claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
INCATools/ontology-development-kit#1390 · 1 assignee ·
-
使用脚本 DD 腾讯云 报错Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
evals: run-validity calls runs VALID when every Bash call failed to start the sandbox (long TMPDIR)Openpriority: medium status: needs-decision work-class: scoped
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
melodic-software/claude-code-plugins#9611 · 2 comments ·
Maintainers usually reply within 1 day