Weird error in production "FailedToBufferBody(UnknownBodyError)" in magic.rs
Problem
This keeps popping up in logs of my production fullstack server. Not sure what it breaks yet.
2025-11-22T21:41:27.176 app[48e73d4f777d18] fra [info] thread '<unnamed>' (658) panicked at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dioxus-fullstack-0.7.1/src/magic.rs:542:69:
2025-11-22T21:41:27.176 app[48e73d4f777d18] fra [info] called `Result::unwrap()` on an `Err` value: FailedToBufferBody(UnknownBodyError(UnknownBodyError(Error { inner: hyper::Error(Body, Custom { kind: UnexpectedEof, error: IncompleteBody }) })))
Steps To Reproduce
No idea.
Expected behavior
No random errors.
Screenshots
Environment:
- Dioxus version: 0.7.1
- App platform: fullstack web
Questionnaire
@patrik-cihal Can you give us an idea to what your page and component structure are like? Also do you only see these logs in production or do you also see them while developing? If you have tracing on requests to print the path for the request that'll also help you figure out what type of body your app is responding with.
I think the fix here is to just bubble up those errors with ? instead of unwrapping them. Some errors with incorrect requests are expected, but we shouldn't panic if that happens
@binarypie No, these errors are relative rare, 1 per 500 requests or so and I see them only in production logs. I agree that the solution here is probably to just not unwrap.