You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.
Hi, I'm trying to integrate the failure crate a bit more tightly into a web framework, so that handlers can return Result<_, failure::Error> directly.
This web framework has a trait ResponseError: failure::Fail, and it requires web handlers to return Result<_, E> where E: ResponseError.
I was trying to impl ResponseError for failure::Error, but quickly realized I can't because failure::Error doesn't impl failure::Fail. Given that Error seems to support all of the same behavior that Fail requires, why doesn't it implement that trait?
The text was updated successfully, but these errors were encountered:
radix
changed the title
Why doesn't Error impl Fail?
Why doesn't Error impl Fail?
Feb 5, 2018
Hi, I'm trying to integrate the
failure
crate a bit more tightly into a web framework, so that handlers can returnResult<_, failure::Error>
directly.This web framework has a
trait ResponseError: failure::Fail
, and it requires web handlers to returnResult<_, E> where E: ResponseError
.I was trying to
impl ResponseError for failure::Error
, but quickly realized I can't becausefailure::Error
doesn't implfailure::Fail
. Given thatError
seems to support all of the same behavior thatFail
requires, why doesn't it implement that trait?The text was updated successfully, but these errors were encountered: