handle DatabaseError in db.get_product_name