Skip to content

fix: reject function route returns#152

Open
Qian001A wants to merge 1 commit into
tscircuit:mainfrom
Qian001A:codex/function-route-return-guidance-30
Open

fix: reject function route returns#152
Qian001A wants to merge 1 commit into
tscircuit:mainfrom
Qian001A:codex/function-route-return-guidance-30

Conversation

@Qian001A
Copy link
Copy Markdown

/claim #30

Summary

  • reject function values returned directly from route handlers
  • add a regression test that confirms the invalid return gets the existing ctx.json guidance

Why

Issue #30 asks for clearer guidance when handlers return unsupported values directly instead of using ctx.json. Existing open PRs cover object/null/primitive cases; this covers the function-return gap without changing the existing message contract.

Validation

  • npx ava tests/errors/do-not-allow-raw-json.test.ts --verbose
  • npx prettier --check src/middleware/with-response-object-check.ts tests/errors/do-not-allow-raw-json.test.ts
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant