Skip to content

Commit

Permalink
fix: no extra context, throw errors from middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Dec 23, 2024
1 parent dbdd43a commit 3757958
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/start/src/client/createServerFn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,11 @@ export function createServerFn<
method: resolvedOptions.method,
data: opts?.data as any,
headers: opts?.headers,
context: Object.assign({}, extractedFn),
}).then((d) => d.result)
context: {},
}).then((d) => {
if (d.error) throw d.error
return d.result
})
},
{
// This copies over the URL, function ID and filename
Expand Down

0 comments on commit 3757958

Please sign in to comment.