mirror of
https://github.com/katanemo/plano.git
synced 2026-06-23 15:38:07 +02:00
replace production panics with graceful error handling in common crate (#844)
This commit is contained in:
parent
36fa42b364
commit
d8f4fd76e3
3 changed files with 9 additions and 4 deletions
|
|
@ -75,7 +75,10 @@ pub trait Client: Context {
|
|||
fn add_call_context(&self, id: u32, call_context: Self::CallContext) {
|
||||
let callouts = self.callouts();
|
||||
if callouts.borrow_mut().insert(id, call_context).is_some() {
|
||||
panic!("Duplicate http call with id={}", id);
|
||||
log::warn!(
|
||||
"Duplicate http call with id={}, previous context overwritten",
|
||||
id
|
||||
);
|
||||
}
|
||||
self.active_http_calls().increment(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue