feat(router): expose HEAD and OPTIONS decorators

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-08-02 20:40:02 -05:00
1 parent 8e38fffd77
commit 63be0ef8f7
6 files changed
+30 -5

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@ export class TransportMismatchError extends HttpError {
const expected = got === 'stream' ? 'return a value' : 'return an AsyncIterable';
const fix =
got === 'stream'
? 'buffered routes (@Get/@Post/@Put/@Patch/@Delete) must return a value — to stream, declare @Sse, @Stream, or @Ws'
? 'buffered routes (@Get/@Head/@Post/@Put/@Patch/@Delete/@Options) must return a value — to stream, declare @Sse, @Stream, or @Ws'
: 'streaming routes (@Sse/@Ws) must return an AsyncIterable (e.g. an async generator or channel())';
super(500, `Transport '${transport}'${where} must ${expected}, but the handler returned a ${got}. ${fix}.`);
}