notify admin when literal not found instead of silently failing
This commit is contained in:
parent
b114c80097
commit
a869362bf5
@ -7,6 +7,7 @@ use std::time::Duration;
|
|||||||
|
|
||||||
use crate::db::raw_calls::RawCallError;
|
use crate::db::raw_calls::RawCallError;
|
||||||
use crate::db::{CallDB, DbError, User, DB};
|
use crate::db::{CallDB, DbError, User, DB};
|
||||||
|
use crate::notify_admin;
|
||||||
use crate::utils::parcelable::{ParcelType, Parcelable, ParcelableError, ParcelableResult};
|
use crate::utils::parcelable::{ParcelType, Parcelable, ParcelableError, ParcelableResult};
|
||||||
use chrono::{DateTime, Days, NaiveTime, ParseError, TimeDelta, Timelike, Utc};
|
use chrono::{DateTime, Days, NaiveTime, ParseError, TimeDelta, Timelike, Utc};
|
||||||
use db::attach_db_obj;
|
use db::attach_db_obj;
|
||||||
@ -477,9 +478,12 @@ impl ButtonName {
|
|||||||
|
|
||||||
Ok(match value {
|
Ok(match value {
|
||||||
Some(value) => Ok(value),
|
Some(value) => Ok(value),
|
||||||
None => Err(ResolveError::IncorrectLiteral(format!(
|
None => {
|
||||||
|
notify_admin(&format!("Literal `{literal}` is not set!!!")).await;
|
||||||
|
Err(ResolveError::IncorrectLiteral(format!(
|
||||||
"not found literal `{literal}` in DB"
|
"not found literal `{literal}` in DB"
|
||||||
))),
|
)))
|
||||||
|
}
|
||||||
}?)
|
}?)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user