try/except around db sync