Add error code for database error.