{"record":{"id":"8acd43ec6ca73595","repo":"DioxusLabs/dioxus","slug":"path-parameter-not-found-in-function-argument","errorCode":null,"errorMessage":"path parameter `{}` not found in function arguments","messagePattern":"path parameter `(.+?)` not found in function arguments","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":673,"sourceCode":"        let mut arg_map = sig\n            .inputs\n            .iter()\n            .enumerate()\n            .filter_map(|(i, item)| match item {\n                syn::FnArg::Receiver(_) => None,\n                syn::FnArg::Typed(pat_type) => Some((i, pat_type)),\n            })\n            .filter_map(|(i, pat_type)| match &*pat_type.pat {\n                syn::Pat::Ident(ident) => Some((ident.ident.clone(), (pat_type.ty.clone(), i))),\n                _ => None,\n            })\n            .collect::<HashMap<_, _>>();\n\n        for (_slash, path_param) in &mut route.path_params {\n            match path_param {\n                PathParam::Capture(_lit, _, ident, ty, _) => {\n                    let (new_ident, new_ty) = arg_map.remove_entry(ident).ok_or_else(|| {\n                        syn::Error::new(\n                            ident.span(),\n                            format!(\"path parameter `{}` not found in function arguments\", ident),\n                        )\n                    })?;\n                    *ident = new_ident;\n                    *ty = new_ty.0;\n                }\n                PathParam::WildCard(_lit, _, _star, ident, ty, _) => {\n                    let (new_ident, new_ty) = arg_map.remove_entry(ident).ok_or_else(|| {\n                        syn::Error::new(\n                            ident.span(),\n                            format!(\"path parameter `{}` not found in function arguments\", ident),\n                        )\n                    })?;\n                    *ident = new_ident;\n                    *ty = new_ty.0;\n                }\n                PathParam::Static(_lit) => {}","sourceCodeStart":655,"sourceCodeEnd":691,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack-macro/src/lib.rs#L655-L691","documentation":"Thrown by the server-function route macro when a path segment declared in the route string (e.g. /users/{id}) does not match any typed argument of the annotated function. The macro builds a map of function argument names and removes entries as path params are matched; a leftover route param means the fn signature is missing that parameter.","triggerScenarios":"Thrown at packages/fullstack-macro/src/lib.rs:673 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a function argument whose name matches the path parameter, or rename/remove the `{param}` segment in the route path so they agree."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}