{"record":{"id":"fd49c5a9a0299315","repo":"DioxusLabs/dioxus","slug":"http-method-specified-both-in-macro-and-in-attribu","errorCode":null,"errorMessage":"HTTP method specified both in macro and in attribute","messagePattern":"HTTP method specified both in macro and in attribute","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/fullstack-macro/src/lib.rs","lineNumber":731,"sourceCode":"        }\n\n        // Disallow multiple query params if one is a catch-all\n        if query_params.iter().any(|param| param.catch_all) && query_params.len() > 1 {\n            return Err(syn::Error::new(\n                Span::call_site(),\n                \"Cannot have multiple query parameters when one is a catch-all\",\n            ));\n        }\n\n        if let Some(options) = route.oapi_options.as_mut() {\n            options.merge_with_fn(function)\n        }\n\n        let method = match (method_from_macro, route.method) {\n            (Some(method), None) => method,\n            (None, Some(method)) => method,\n            (Some(_), Some(_)) => {\n                return Err(syn::Error::new(\n                    Span::call_site(),\n                    \"HTTP method specified both in macro and in attribute\",\n                ));\n            }\n            (None, None) => {\n                return Err(syn::Error::new(\n                    Span::call_site(),\n                    \"HTTP method not specified in macro or in attribute\",\n                ));\n            }\n        };\n\n        Ok(Self {\n            method,\n            route_lit: route.route_lit,\n            path_params: route.path_params,\n            query_params,\n            oapi_options: route.oapi_options,","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack-macro/src/lib.rs#L713-L749","documentation":"The HTTP verb was supplied twice: once in the macro invocation (e.g. #[server(GET)]) and once in the route attribute (#[route(..., method = ...)]). The macro refuses to pick between two conflicting sources for the same method.","triggerScenarios":"Thrown at packages/fullstack-macro/src/lib.rs:731 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Specify the HTTP method in exactly one place: either in the macro (e.g. #[get]) or in the attribute, not both."],"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"}