[bug fix] PTSDK-1166

fix when onfail event is triggered by an invalid URL had unexpected
error in the console
Merge remote-tracking branch 'upstream/next' into next
Merge pull request #145 from zivchang/next

[bug fix] PTSDK-1166