feat: allow any type that implements FromServerFnError as a replacement of the ServerFnError in server_fn (#3274)

This commit is contained in:
Ryo Hirayama
2025-01-18 03:30:12 +09:00
committed by GitHub
parent 9fd2a75da4
commit cfe925d58f
37 changed files with 1054 additions and 909 deletions

View File

@@ -369,7 +369,6 @@ pub fn handle_server_fns_with_context(
// actually run the server fn
let mut res = ActixResponse(
service
.0
.run(ActixRequest::from((req, payload)))
.await
.take(),

View File

@@ -368,8 +368,6 @@ async fn handle_server_fns_inner(
additional_context: impl Fn() + 'static + Clone + Send,
req: Request<Body>,
) -> impl IntoResponse {
use server_fn::middleware::Service;
let method = req.method().clone();
let path = req.uri().path().to_string();
let (req, parts) = generate_request_and_parts(req);