tower-rs / tower-h2

An HTTP/2.0 client and server `Service` implementation.
MIT License
89 stars 18 forks source link

No good way to access client::Error's inner h2::Error #40

Open samamill opened 5 years ago

samamill commented 5 years ago

Result does not return the h2::Error, only h2.result().

Cause returns the inner error as an std::error::Error, which cannot be downcast to h2::Error since it is not static

I made a fix to our fork to expose h2::Error. Should I merge this to master too? https://github.com/rbtying/tower-h2/pull/1/files