Skip to content

Commit

Permalink
silence errors even more
Browse files Browse the repository at this point in the history
  • Loading branch information
fhenneke committed Oct 31, 2024
1 parent ef50ecf commit 58b9958
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,13 @@ def write_prices_new(self, prices: list[tuple[str, int, float, str]]) -> None:
"source": source,
},
)
except psycopg.errors.NumericValueOutOfRange:
except (
psycopg.errors.NumericValueOutOfRange,
psycopg.errors.UniqueViolation,
) as err:
logger.info(
f"Error while writing price data. token: {token_address}, "
f"time: {time}, price: {price}, source: {source}"
f"Error while writing price data: {err}."
f"token: {token_address}, time: {time}, price: {price}, source: {source}"
)

def get_latest_transaction(self) -> str | None:
Expand Down

0 comments on commit 58b9958

Please sign in to comment.