diff --git a/integrations/axum/src/lib.rs b/integrations/axum/src/lib.rs
index 31475091a0..0099fab8ba 100644
--- a/integrations/axum/src/lib.rs
+++ b/integrations/axum/src/lib.rs
@@ -161,15 +161,14 @@ pub async fn generate_request_and_parts(
) -> (Request
, RequestParts) {
// provide request headers as context in server scope
let (parts, body) = req.into_parts();
- let body = match body
+ let body = body
.collect::>()
.await
.into_iter()
.collect::, _>>()
- {
- Ok(body) => body.concat().into(),
- Err(_) => Bytes::default(),
- };
+ .unwrap_or_default()
+ .concat()
+ .into();
let request_parts = RequestParts {
method: parts.method.clone(),
uri: parts.uri.clone(),
diff --git a/integrations/viz/src/lib.rs b/integrations/viz/src/lib.rs
index 03f1f5ee02..a1c14154f3 100644
--- a/integrations/viz/src/lib.rs
+++ b/integrations/viz/src/lib.rs
@@ -107,15 +107,14 @@ pub fn redirect(path: &str) {
pub async fn generate_request_parts(req: Request) -> RequestParts {
// provide request headers as context in server scope
let (parts, body) = req.into_parts();
- let body = match body
+ let body = body
.collect::>()
.await
.into_iter()
.collect::, _>>()
- {
- Ok(body) => body.concat().into(),
- Err(_) => Bytes::default(),
- };
+ .unwrap_or_default()
+ .concat()
+ .into();
RequestParts {
method: parts.method,