Skip to content

Commit 1cd2698

Browse files
better error message
1 parent ad7ccc1 commit 1cd2698

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/common/src/integrations/lockr.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@ impl LockrIntegration {
190190
let backend_name = ensure_backend_from_url(&self.config.api_endpoint)
191191
.change_context(Self::error("Failed to determine backend for API proxy"))?;
192192

193-
let response = target_req
194-
.send(backend_name)
195-
.change_context(Self::error(format!(
196-
"Failed to forward request to {}",
197-
target_url
198-
)))?;
193+
let response = match target_req .send(backend_name) {
194+
Ok(res) => res,
195+
Err(e) => {
196+
return Err(Self::error(format!("failed to forward request to {}, {}", target_url, e.root_cause())).into());
197+
}
198+
}
199199

200200
log::info!("Lockr API responded with status: {}", response.get_status());
201201

0 commit comments

Comments
 (0)