You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Server function returns undefined on raw response value #5271
Hi, I'm testing with server function returning raw response object and found two issues:
When the response contains header value Content-Type: 'application/json', the result of the server function when calling from client would be undefined
Typing issue when trying to return a raw response from server function
Argument of type '() => Promise<Response>' is not assignable to parameter of type 'ServerFn<Register, Method, undefined, undefined, Response>'.
Type 'Promise<Response>' is not assignable to type 'ServerFnReturnType<Register, Response>'.
Type 'Promise<Response>' is not assignable to type 'Promise<{ readonly headers: { append: "Function is not serializable"; delete: "Function is not serializable"; get: "Function is not serializable"; getSetCookie: "Function is not serializable"; ... 6 more ...; [Symbol.iterator]: "Function is not serializable"; }; ... 13 more ...; text: "Function is not serializable";...'.
changed the title [-]Server function return undefined on raw response value[/-][+]Server function returns undefined on raw response value[/+]on Sep 28, 2025
Activity
[-]Server function return undefined on raw response value[/-][+]Server function returns undefined on raw response value[/+]fix: allow async Response in server function return types
fix: annotate raw server function responses to avoid deserialization …
fix: allow async Response in server function return types
fix: annotate raw server function responses to avoid deserialization …