[bug fix] PTSDK-1166

fix when onfail event is triggered by an invalid URL had unexpected
error in the console