sync db errors handling