from_data.rs has Err(err) => Failure((Status::InternalServerError, err)) and from_request.rs has Err(val) => Failure((Status::BadRequest, val)).
This is by design, though a rather arbitrary one. IntoOutcome is not a particularly great trait at the moment. I believe the API should be:
result.into_outcome(failing_status)
This will remove the current arbitrary nature while adding flexibility.
Putting this in the 0.4 bucket for now.
Most helpful comment
This is by design, though a rather arbitrary one.
IntoOutcomeis not a particularly great trait at the moment. I believe the API should be:This will remove the current arbitrary nature while adding flexibility.