get error messages from db_query