catch error while lazy loading snippet