reqwest-middleware icon indicating copy to clipboard operation
reqwest-middleware copied to clipboard

Implement Error.status()

Open jayvdb opened this issue 2 years ago • 1 comments

Motivations

The local Error is a simple enum between the underlying reqwest::Error and middleware errors. It would be nice if this Error implemented the same interface as reqwest::Error, esp adding .status()

c.f. https://github.com/oxidecomputer/progenitor/pull/252 for why this could be useful.

Solution

Alternatives

Additional context

jayvdb avatar Nov 22 '22 21:11 jayvdb

Great idea, thanks for the suggestion. I have no opposition to this

conradludgate avatar Nov 23 '22 11:11 conradludgate