Skip to content

Commit

Permalink
Temporary change error type to gather more info
Browse files Browse the repository at this point in the history
  • Loading branch information
nieznanysprawiciel committed Dec 20, 2023
1 parent c2b468e commit 41be131
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion exe-unit/components/transfer/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ pub enum HttpError {
impl From<PayloadError> for HttpError {
fn from(error: PayloadError) -> Self {
match error {
PayloadError::Io(io_err) => HttpError::Io(io_err.kind()),
//PayloadError::Io(io_err) => HttpError::Io(io_err.kind()),
PayloadError::Io(io_err) => HttpError::Other(format!("IO error: {}", io_err.display())),
payload_err => HttpError::Payload(payload_err),
}
}
Expand Down
1 change: 1 addition & 0 deletions exe-unit/components/transfer/tests/test_transfer_abort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async fn test_transfer_abort(ctx: &mut DroppableTestContext) -> anyhow::Result<(
"RUST_LOG",
env::var("RUST_LOG").unwrap_or_else(|_| "debug".into()),
);
// Uncomment to enable logs
//env_logger::try_init().ok();

let temp_dir = temp_dir!("transfer-abort")?;
Expand Down
4 changes: 3 additions & 1 deletion exe-unit/components/transfer/tests/test_transfer_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ async fn test_transfer_scenarios(ctx: &mut DroppableTestContext) -> anyhow::Resu
"RUST_LOG",
env::var("RUST_LOG").unwrap_or_else(|_| "debug".into()),
);
// Uncomment to enable logs
//env_logger::try_init().ok();

let dir = temp_dir!("transfer")?;
Expand All @@ -69,7 +70,7 @@ async fn test_transfer_scenarios(ctx: &mut DroppableTestContext) -> anyhow::Resu
ContainerVolume {
name: "vol-3".into(),
path: "/extract".into(),
},
}, // Uncomment to enable logs
];

let chunk_size = 4096_usize;
Expand Down Expand Up @@ -172,6 +173,7 @@ async fn test_transfer_archived(ctx: &mut DroppableTestContext) -> anyhow::Resul
"RUST_LOG",
env::var("RUST_LOG").unwrap_or_else(|_| "debug".into()),
);
// Uncomment to enable logs
//env_logger::try_init().ok();

let dir = temp_dir!("transfer-archive")?;
Expand Down

0 comments on commit 41be131

Please sign in to comment.