Skip to content

FromData Failures cannot be caught by error catchers and are not debug-logged #1199

Closed
@villem

Description

@villem

Hello,

Bug reports must include:

  1. The version of Rocket you're using. Ensure it's the latest, if possible.

0.4.2, rustc --version
rustc 1.42.0-nightly (0de96d37f 2019-12-19)

  1. The operating system (distribution and version) where the issue occurs.

OSX 10.5.2
3. A brief description of the bug that includes:
* The nature of the bug.

FromData and FromDataSimple ask (status, Error) for Failure. As far as I can see the Error is not populated any where.

* When the bug occurs.
* What you expected vs. what actually happened.

It would be good to get Error output to up to default catcher response Outputs.

  1. How you uncovered the bug. Short, reproducible tests are especially useful.

Simplest FromDataSimple Guard do not show Error any where, not even debug level logs.

  1. Ideas, if any, about what Rocket is doing incorrectly.

Rocket transforms rocket::request::Outcome to rocket::Outcome and just drops the addition E info all together.
It would be very convenient if the Error info could be populated from data parsers to above levels. Now I need to do FromDataSimple functionality in post route fn itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    deficiencySomething doesn't work as well as it could

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions