{"record":{"id":"44adde71b4a202a7","repo":"DioxusLabs/dioxus","slug":"routes-should-start-with-error-found-in-the-rou","errorCode":null,"errorMessage":"Routes should start with /. Error found in the route '{}'","messagePattern":"Routes should start with /\\. Error found in the route '(.+?)'","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"packages/router-macro/src/segment.rs","lineNumber":169,"sourceCode":"    };\n\n    let (route_string, query) = match route_string.rsplit_once('?') {\n        Some((route, query)) => (\n            route,\n            Some(QuerySegment::parse_from_str(\n                route_span,\n                fields.clone(),\n                query,\n            )?),\n        ),\n        None => (route_string, None),\n    };\n    let mut iterator = route_string.split('/');\n\n    // skip the first empty segment\n    let first = iterator.next();\n    if first != Some(\"\") {\n        return Err(syn::Error::new(\n            route_span,\n            format!(\n                \"Routes should start with /. Error found in the route '{}'\",\n                route\n            ),\n        ));\n    }\n\n    while let Some(segment) = iterator.next() {\n        if let Some(segment) = segment.strip_prefix(':') {\n            let spread = segment.starts_with(\"..\");\n\n            let ident = if spread {\n                segment[2..].to_string()\n            } else {\n                segment.to_string()\n            };\n","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/393d190a801ccb441d41923e232289b4f8a5c669/packages/router-macro/src/segment.rs#L151-L187","documentation":"Error \"Routes should start with /. Error found in the route '{}'\" thrown in DioxusLabs/dioxus.","triggerScenarios":"Thrown at packages/router-macro/src/segment.rs:169 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"393d190a801ccb441d41923e232289b4f8a5c669","analyzedAt":"2026-08-16T11:27:45.815Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}