feat(router): expose HEAD and OPTIONS decorators
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
6 files changed
+30
-5
No files matched your search
+1
-1
@@ -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}.`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user