Fix a bug where HTTP errors where being reported incorrectly (#18828)

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
Mikayla Maki 2024-10-07 12:03:02 -07:00 committed by GitHub
parent 7d380e9e18
commit 8cdb9d6b85
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 50 additions and 2 deletions

View file

@ -1,4 +1,4 @@
use std::{borrow::Cow, io::Read, pin::Pin, task::Poll};
use std::{any::type_name, borrow::Cow, io::Read, pin::Pin, task::Poll};
use anyhow::anyhow;
use bytes::{BufMut, Bytes, BytesMut};
@ -183,6 +183,10 @@ impl http_client::HttpClient for ReqwestClient {
None
}
fn type_name(&self) -> &'static str {
type_name::<Self>()
}
fn send(
&self,
req: http::Request<http_client::AsyncBody>,