Agent skill

Hono Subapp Undefined Response 1101

by divinevideo in divinevideo/divine-mobile

Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response.

MPL-2.0Auto-check passed

Install Hono Subapp Undefined Response 1101

skills CLI
$ npx skills add divinevideo/divine-mobile --skill hono-subapp-undefined-response-1101 -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install divinevideo/divine-mobile hono-subapp-undefined-response-1101 --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/divinevideo/divine-mobile.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/hono-subapp-undefined-response-1101 .claude/skills/hono-subapp-undefined-response-1101 && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hono-subapp-undefined-response-1101
GitHub stars
266
Token cost
~1k tokens
SKILL.md length
421 words
Files
1
Skills in repo
103
Repo updated
First seen
Licence
MPL-2.0

At a glance

Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response.

  • Works in 3 steps: Run wrangler dev and curl with the… → Should return a valid HTTP status (200,… → No "did not resolve to Response" errors…
  • Error 1101 on a specific hostname but not others sharing the same worker
  • SKILL.md covers Problem, Context / Trigger Conditions, Root Cause and Solution, plus 3 more sections
  • Calls wrangler and curl

What it does

Hono Subapp Undefined Response 1101 is an agent skill from divinevideo/divine-mobile. Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response. Use when: (1) Error 1101 on a specific hostname but not others sharing the same worker, (2) "the Promise did not resolve to 'Response'" in wrangler dev logs, (3) Hono sub-app route handler uses bare return to skip handling for non-matching hostnames or conditions. The fix is to add next parameter and call return next() instead of bare return in route handlers that…

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Hono and Cloudflare Workers. The licence is MPL-2.0.

When your agent uses it

  • Error 1101 on a specific hostname but not others sharing the same worker
  • The Promise did not resolve to Response in wrangler dev logs
  • Hono sub-app route handler uses bare return to skip handling for non-matching hostnames

Example prompts

  • “Worker threw exception”
  • “the Promise did not resolve to”
  • “/hono-subapp-undefined-response-1101”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Run wrangler dev and curl with the non-matching hostname
  2. Should return a valid HTTP status (200, 404, etc.) instead of 500
  3. No "did not resolve to Response" errors in the terminal

What it can do on your machine

Read from SKILL.md and the folder at commit c3d6f7e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • wrangler
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use wrangler and curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hono Subapp Undefined Response 1101 loads about 1k tokens when it runs. Until then it costs about 143 tokens; SKILL.md has 421 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~143
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from divinevideo/divine-mobile at commit c3d6f7e, republished under its MPL-2.0 licence (© divinevideo). 421 words, ~1,016 tokens.

Download SKILL.mdSave it as .claude/skills/hono-subapp-undefined-response-1101/SKILL.md (or your agent's skills folder).
name
hono-subapp-undefined-response-1101
description
Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response. Use when: (1) Error 1101 on a specific hostname but not others sharing the same worker, (2) "the Promise did not resolve to 'Response'" in wrangler dev logs, (3) Hono sub-app route handler uses bare `return` to skip handling for non-matching hostnames or conditions. The fix is to add `next` parameter and call `return next()` instead of bare `return` in route handlers that conditionally skip.
author
Claude Code
version
1.0.0
date
2026-02-27

Hono Sub-App Route Handler Returns Undefined → CF Error 1101

Problem

A Cloudflare Worker using Hono with sub-apps crashes with Error 1101 ("Worker threw exception") when a route handler in a sub-app returns undefined instead of a Response. This commonly happens when route handlers have hostname guards that use bare return to skip processing, intending to let other routes handle the request.

Context / Trigger Conditions

  • Cloudflare Workers dashboard or browser shows Error 1101: Worker threw exception
  • wrangler dev logs show: "Incorrect type for Promise: the Promise did not resolve to 'Response'"
  • Multiple hostnames route to the same worker (e.g., names.divine.video and names.admin.divine.video)
  • Hono sub-app has route handlers with conditional hostname checks that use bare return
  • The sub-app has middleware that calls next() for non-matching hostnames, but the route handlers duplicate the check and return undefined

Root Cause

In Hono, route handlers (.get(), .post(), etc.) MUST return a Response. Only middleware (registered via .use()) can call next() to pass control downstream.

However, if a route handler includes next in its parameter list (async (c, next) => {}), Hono treats it as middleware-like, allowing return next() to pass control to the next matching handler.

A bare return (which returns undefined) from a route handler causes the Cloudflare Workers runtime to throw because it expects a Response object.

Solution

Bad — returns undefined, crashes the worker:

typescript
app.get('/', async (c) => {
  if (!ALLOWED_HOSTNAMES.includes(hostname)) {
    return // undefined! → Error 1101
  }
  return c.html(page())
})

Good — accepts next parameter and calls it to pass control:

typescript
app.get('/', async (c, next) => {
  if (!ALLOWED_HOSTNAMES.includes(hostname)) {
    return next() // passes to next handler in chain
  }
  return c.html(page())
})

Key insight: Adding next to the handler signature changes Hono's treatment of the handler, allowing it to delegate to downstream routes.

Show full SKILL.md (182 more words)Show less

Verification

  1. Run wrangler dev and curl with the non-matching hostname:
    bash
    curl -s -o /dev/null -w "%{http_code}" http://localhost:8787/ -H "Host: other.example.com"
  2. Should return a valid HTTP status (200, 404, etc.) instead of 500
  3. No "did not resolve to Response" errors in the terminal

Example

A worker serves both names.divine.video (public UI) and names.admin.divine.video (admin SPA). The public routes sub-app has a landing page handler that only responds for names.divine.video. When names.admin.divine.video hits this handler, it should pass through to the catch-all admin SPA handler. Using bare return crashes the worker; using return next() (with next in params) properly delegates.

Notes

  • This only applies to Hono route handlers, not middleware (.use() handlers always have next)
  • The error is invisible in Cloudflare's dashboard — you only see generic "Error 1101"
  • wrangler dev gives the real error: "the Promise did not resolve to 'Response'"
  • If your sub-app middleware already guards routes, you may not need hostname checks in individual handlers at all — but if you do, use the next pattern
  • This pattern is common in multi-tenant workers where one worker handles multiple hostnames

© divinevideo, MPL-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/hono-subapp-undefined-response-1101 of divinevideo/divine-mobile.

Open the folder on GitHubat commit c3d6f7e

Compare with similar skills

Hono Subapp Undefined Response 1101 next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hono Subapp Undefined Response 1101 compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hono Subapp Undefined Response 1101 this skilldivinevideo/divine-mobile266—~1kAutomated safety check: PassMPL-2.0
Publish To Mdpagemaypaz/md.page116—~610Automated safety check: NotesMIT
Hono Idiomsirahardianto/awesome-agv156—~3kAutomated safety check: PassMIT
Honodavila7/claude-code-templates33k3 repos~2.6kAutomated safety check: PassMIT
Cloudflare WorkersEpicenterHQ/epicenter4.8k—~576Automated safety check: PassCustom licence
HonoEpicenterHQ/epicenter4.8k—~513Automated safety check: PassCustom licence

Similar skills

  • Publish To Mdpage

    maypaz/md.page

    Turn any markdown into a shareable web page via md.page. An agent skill from maypaz/md.page.

    116 GitHub stars~610 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check: notes
  • Hono Idioms

    irahardianto/awesome-agv

    Hono lightweight web framework patterns: type-safe route handlers, middleware composition, Zod validation, and RPC clients for Cloudflare Workers, Node, or Bun.

    156 GitHub stars~3k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Hono

    davila7/claude-code-templates

    Build ultra-fast web APIs and full-stack apps with Hono — runs on Cloudflare Workers, Deno, Bun, Node.js, and any WinterCG-compatible runtime.

    33k GitHub starsUsed in 3 repos~2.6k tokens
    Backend & APIsAuto-check passed
  • Cloudflare Workers

    EpicenterHQ/epicenter

    Cloudflare Workers patterns for Worker runtime APIs, Durable Objects, KV, R2, D1, Queues, WebSockets, streaming responses, bindings, wrangler configuration, and deployment limits.

    4.8k GitHub stars~576 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Hono

    EpicenterHQ/epicenter

    Hono patterns for TypeScript API routes, middleware, request and response typing, streaming, WebSockets, and Cloudflare Workers deployment.

    4.8k GitHub stars~513 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Project Docs

    jezweb/claude-skills

    Generate project documentation from codebase analysis — ARCHITECTURE.md, APIENDPOINTS.md, DATABASESCHEMA.md.

    1.1k GitHub stars~1.6k tokensUpdated yesterday
    DatabasesAuto-check: notes

More from divinevideo/divine-mobile

All 103 skills in this repo
  • Fix ArgoCD ExternalSecret deployment failing with "namespace X is not permitted in project Y".

    266 GitHub stars~931 tokensUpdated today
    Auto-check passed
  • Art Direct

    divinevideo/divine-mobile

    Art direction for any content — reads text, PDF, Word, HTML, PPT, then proposes 2-3 creative directions with photography style, mood, and visual language.

    266 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Async Await Null Race Condition

    divinevideo/divine-mobile

    Fix "Null check operator used on a null value" errors when an object is set to null during an async await.

    266 GitHub stars~881 tokensUpdated today
    Auto-check passed
  • AWS V4 Signing Custom Headers Gcs

    divinevideo/divine-mobile

    Add custom metadata headers (x-amz-meta-) to AWS v4 signed requests for GCS S3-compatible API.

    266 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Bash Herestring Newline Secrets

    divinevideo/divine-mobile

    Fix password/secret authentication failures caused by trailing newlines when creating Google Cloud secrets (or similar) with bash here-strings.

    266 GitHub stars~791 tokensUpdated today
    Auto-check passed
  • Fix silent video/media processing failures caused by URL extraction code that filters on file extensions (.mp4, .webm, .webp).

    266 GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about Hono Subapp Undefined Response 1101

What does Hono Subapp Undefined Response 1101 do?

Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response. Hono Subapp Undefined Response 1101 is an agent skill from divinevideo/divine-mobile. Fix Cloudflare Workers Error 1101 "Worker threw exception" caused by Hono sub-app route handlers returning undefined instead of a Response.

When should I use Hono Subapp Undefined Response 1101?

Hono Subapp Undefined Response 1101 fits situations like: error 1101 on a specific hostname but not others sharing the same worker; the Promise did not resolve to Response in wrangler dev logs; hono sub-app route handler uses bare return to skip handling for non-matching hostnames.

How do I install Hono Subapp Undefined Response 1101 in Claude Code?

Run `npx skills add divinevideo/divine-mobile --skill hono-subapp-undefined-response-1101 -a claude-code`. Or copy the skill folder (.agents/skills/hono-subapp-undefined-response-1101 in divinevideo/divine-mobile) into .claude/skills/hono-subapp-undefined-response-1101 in your project. Claude Code loads it when a task matches its description.

How do I install Hono Subapp Undefined Response 1101 in Codex?

Run `npx skills add divinevideo/divine-mobile --skill hono-subapp-undefined-response-1101 -a codex`. Or copy the skill folder (.agents/skills/hono-subapp-undefined-response-1101 in divinevideo/divine-mobile) into .agents/skills/hono-subapp-undefined-response-1101 in your project. Codex loads it when a task matches its description.

Can I use Hono Subapp Undefined Response 1101 in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add divinevideo/divine-mobile --skill hono-subapp-undefined-response-1101 -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hono-subapp-undefined-response-1101, .gemini/skills/hono-subapp-undefined-response-1101, .github/skills/hono-subapp-undefined-response-1101 and .opencode/skills/hono-subapp-undefined-response-1101 in your project.

What does Hono Subapp Undefined Response 1101 need to run?

Going by SKILL.md and its folder, Hono Subapp Undefined Response 1101 needs the command-line tools its instructions call (wrangler and curl).

Does Hono Subapp Undefined Response 1101 access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Hono Subapp Undefined Response 1101 safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Hono Subapp Undefined Response 1101 use?

Hono Subapp Undefined Response 1101 is published under the MPL-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hono Subapp Undefined Response 1101 use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hono Subapp Undefined Response 1101?

Skills that share tags, products or a category with Hono Subapp Undefined Response 1101: Publish To Mdpage (maypaz/md.page, 116 stars), Hono Idioms (irahardianto/awesome-agv, 156 stars), Hono (davila7/claude-code-templates, 33k stars) and Cloudflare Workers (EpicenterHQ/epicenter, 4.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hono Subapp Undefined Response 1101?

divinevideo (a GitHub organization) maintains it in divinevideo/divine-mobile, which has 266 GitHub stars. The repository holds 103 skills in this directory. The repository was last updated on October 10, 2026.

Source: divinevideo/divine-mobile on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.