HandlerResult
type HandlerResult = FlareResponse | Response | AsyncIterable<unknown> | object | null | undefinedAll values a route handler is permitted to return.
At the transport layer, any non-ResponseLike value is normalised to a
FlareResponse by normalizeHandlerResult before being written to the
client. Ordering of the union matches the runtime dispatch table:
FlareResponse/Response: passed through unchanged.AsyncIterable<unknown>: wrapped in a chunked streamingFlareResponse.object: either a model instance (serialised via its compiled serializer) or a plain object/array (serialised withJSON.stringify).null/undefined: throws an internal error.
Any other value (primitive, function, symbol, etc.) throws an unsupported-type internal error.
Learn: Overview