mirror of
https://github.com/katanemo/plano.git
synced 2026-05-11 00:32:42 +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
|
|
@ -73,7 +73,10 @@ impl RatelimitMap {
|
|||
match new_ratelimit_map.datastore.get_mut(&ratelimit_config.model) {
|
||||
Some(limits) => match limits.get_mut(&ratelimit_config.selector) {
|
||||
Some(_) => {
|
||||
panic!("repeated selector. Selectors per provider must be unique")
|
||||
log::error!(
|
||||
"repeated selector for model '{}'. Selectors per provider must be unique, skipping duplicate",
|
||||
ratelimit_config.model
|
||||
);
|
||||
}
|
||||
None => {
|
||||
limits.insert(ratelimit_config.selector, limit);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue