DioxusLabs/dioxus · error · syn::Error

query parameter ` ` not found in function arguments

Error message

query parameter `{}` not found in function arguments

What it means

Same arg-matching pass as path params, but for query parameters: a {?:query} binding in the route string names an identifier that is not present among the function's typed arguments, so the macro cannot bind or type the query parameter.

Solutions

  1. Add a function argument matching the query parameter name, or remove the query parameter from the route string.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/fullstack-macro/src/lib.rs:698 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/f36ae3e2dd1be3fe. Report an issue: GitHub.

Appendix: source

Thrown at packages/fullstack-macro/src/lib.rs:698

                }
                PathParam::WildCard(_lit, _, _star, ident, ty, _) => {
                    let (new_ident, new_ty) = arg_map.remove_entry(ident).ok_or_else(|| {
                        syn::Error::new(
                            ident.span(),
                            format!("path parameter `{}` not found in function arguments", ident),
                        )
                    })?;
                    *ident = new_ident;
                    *ty = new_ty.0;
                }
                PathParam::Static(_lit) => {}
            }
        }

        let mut query_params = Vec::new();
        for param in route.query_params {
            let (ident, ty) = arg_map.remove_entry(&param.binding).ok_or_else(|| {
                syn::Error::new(
                    param.binding.span(),
                    format!(
                        "query parameter `{}` not found in function arguments",
                        param.binding
                    ),
                )
            })?;
            query_params.push(QueryParam {
                binding: ident,
                name: param.name,
                catch_all: param.catch_all,
                ty: ty.0,
                arg_idx: ty.1,
            });
        }

        // Disallow multiple query params if one is a catch-all
        if query_params.iter().any(|param| param.catch_all) && query_params.len() > 1 {

View on GitHub (pinned to 24f6a829df)