Update DB error logic