Skip to content

Commit 903fdc9

Browse files
committed
continue instead of panic in the task
1 parent a1304b2 commit 903fdc9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

runtimes/core/src/trace/log.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,17 @@ impl Reporter {
106106
let (tx, rx) = tokio::sync::mpsc::unbounded_channel::<Result<bytes::Bytes, std::convert::Infallible>>();
107107
let body = reqwest::Body::wrap_stream(UnboundedReceiverStream::new(rx));
108108

109-
let mut req = self.http_client
109+
let mut req = match self.http_client
110110
.post(self.config.trace_endpoint.clone())
111111
.headers(trace_headers.clone())
112112
.body(body)
113-
.build()
114-
.unwrap_or_else(|err| {
115-
log::error!("failed to build trace request: {:?}", err);
116-
panic!("Failed to build trace request");
117-
});
113+
.build() {
114+
Ok(req) => req,
115+
Err(err) => {
116+
log::error!("failed to build trace request: {:?}", err);
117+
continue;
118+
}
119+
};
118120

119121
if let Err(err) = self.config.platform_validator.sign_outgoing_request(&mut req) {
120122
log::error!("failed to sign trace request: {:?}", err);

0 commit comments

Comments
 (0)