mirror of
https://codeberg.org/icewind/log-normalizer.git
synced 2026-06-03 05:44:06 +02:00
ignore logs with invalid integers
This commit is contained in:
parent
17db2f8074
commit
2349327104
1 changed files with 6 additions and 1 deletions
|
|
@ -61,7 +61,12 @@ async fn get_log(pool: &PgPool, id: i32) -> Result<Option<NormalizedLog>, MainEr
|
|||
match serde_json::from_value(row.0) {
|
||||
Ok(log) => Ok(Some(log)),
|
||||
Err(err) => {
|
||||
if format!("{}", err).starts_with("Invalid SteamID") {
|
||||
let formatted_err = format!("{}", err);
|
||||
eprintln!("{}", formatted_err);
|
||||
if formatted_err.starts_with("Invalid SteamID") {
|
||||
return Ok(None);
|
||||
}
|
||||
if formatted_err.starts_with("invalid value: integer ") {
|
||||
return Ok(None);
|
||||
}
|
||||
Err(err.into())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue