Added embed code error handling