Office /pdf/edit/<file> route 404 — axum 0.8 {param} syntax used while workspace pinned to axum 0.7 #29

Closed
opened 2026-05-11 11:10:16 +00:00 by zaelgohary · 1 comment
Member

Opening any uploaded PDF (or any sub-type editor URL) from the Office island redirects to e.g.

/hero_office/ui/pdf/edit/<file>.pdf?context=geomind

and returns 404 from hero_office_admin.

Root cause: commit b61b102 (fix: migrate :param routes to axum 0.8 capture syntax) rewrote route literals in crates/hero_office_admin/src/main.rs to axum 0.8 brace syntax ({doc_type}, {filename}), but hero_office/Cargo.toml still pins axum = { version = "0.7", ... }. axum 0.7 treats {doc_type} as a literal path segment, so /pdf/edit/x.pdf never matches the registered route. Every /{doc_type} and /{doc_type}/edit/{filename} route silently 404s.

Fix: revert b61b102 — restore :doc_type/:filename syntax until axum is upgraded workspace-wide.

Opening any uploaded PDF (or any sub-type editor URL) from the Office island redirects to e.g. ``` /hero_office/ui/pdf/edit/<file>.pdf?context=geomind ``` and returns 404 from `hero_office_admin`. **Root cause:** commit b61b102 (`fix: migrate :param routes to axum 0.8 capture syntax`) rewrote route literals in `crates/hero_office_admin/src/main.rs` to axum 0.8 brace syntax (`{doc_type}`, `{filename}`), but `hero_office/Cargo.toml` still pins `axum = { version = "0.7", ... }`. axum 0.7 treats `{doc_type}` as a literal path segment, so `/pdf/edit/x.pdf` never matches the registered route. Every `/{doc_type}` and `/{doc_type}/edit/{filename}` route silently 404s. **Fix:** revert b61b102 — restore `:doc_type`/`:filename` syntax until axum is upgraded workspace-wide.
Author
Member

Reverted in 2de2b42.

Reverted in 2de2b42.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_office#29
No description provided.