test: drive the non-text message-part rejection 400 path (#63) #103
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #101 (commit
2b4ec0bf, closes #63) made the anonymous share-chat funnel reject any message containing a non-text part: apps/server/src/core/ai-chat/public-share-chat.controller.ts:295throw new HttpException('Unsupported message content', 400)— a size-cap-bypass guard.Gap: the 400 path is never driven. The string appears in no spec, though the funnel is already fully test-harnessed.
Needed: in the controller funnel spec, add a case with
messages:[{ role:'user', parts:[{type:'tool-call'}] }]asserting status 400; plus a message mixing a text and a non-text part still 400s (rejected before the 413 size check).Found in code review of PR #101.