Skip to content

Commit 3da1832

Browse files
committed
add another exception for yet unknown exceptions
1 parent 80e0a09 commit 3da1832

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

mapswipe_workers/mapswipe_workers/firebase_to_postgres/transfer_results.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ def transfer_results_for_project(project_id, results):
9797
truncate_temp_results()
9898
save_results_to_postgres(results_file)
9999
except psycopg2.errors.ForeignKeyViolation as e:
100+
sentry.capture_exception(e)
101+
sentry.capture_message(
102+
"could not transfer results to postgres due to ForeignKeyViolation: "
103+
f"{project_id}"
104+
)
105+
logger.exception(e)
106+
logger.warning(
107+
"could not transfer results to postgres due to ForeignKeyViolation: "
108+
f"{project_id}"
109+
)
110+
except Exception as e:
100111
sentry.capture_exception(e)
101112
sentry.capture_message(f"could not transfer results to postgres: {project_id}")
102113
logger.exception(e)

0 commit comments

Comments
 (0)