Check for db errors