Skip to content

Commit

Permalink
fix: specify correct serialization trait in server fn handler (closes l…
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj committed Jun 14, 2024
1 parent dcaa1df commit 33e7ed8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions integrations/axum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ use leptos_meta::{generate_head_metadata_separated, MetaContext};
use leptos_router::*;
use once_cell::sync::OnceCell;
use parking_lot::RwLock;
use server_fn::{error::NoCustomError, redirect::REDIRECT_HEADER};
use server_fn::{
error::{NoCustomError, ServerFnErrorSerde},
redirect::REDIRECT_HEADER,
};
use std::{fmt::Debug, io, pin::Pin, sync::Arc, thread::available_parallelism};
use tokio_util::task::LocalPoolHandle;
use tracing::Instrument;
Expand Down Expand Up @@ -357,9 +360,10 @@ async fn handle_server_fns_inner(
rx.await.unwrap_or_else(|e| {
(
StatusCode::INTERNAL_SERVER_ERROR,
ServerFnError::<NoCustomError>::ServerError(e.to_string())
.ser()
.unwrap_or_default(),
ServerFnErrorSerde::ser(
&ServerFnError::<NoCustomError>::ServerError(e.to_string()),
)
.unwrap_or_default(),
)
.into_response()
})
Expand Down

0 comments on commit 33e7ed8

Please sign in to comment.