diff --git a/server_fn_macro/src/lib.rs b/server_fn_macro/src/lib.rs index e17d489c8..613987aa4 100644 --- a/server_fn_macro/src/lib.rs +++ b/server_fn_macro/src/lib.rs @@ -638,7 +638,7 @@ fn err_type(return_ty: &Type) -> Result> { { if let Some(segment) = pat.path.segments.last() { if segment.ident == "ServerFnError" { - let args = &pat.path.segments[0].arguments; + let args = &segment.arguments; match args { // Result PathArguments::None => return Ok(None),