diff --git a/lib/rxp-hpp.js b/lib/rxp-hpp.js index 192ff75..b19d04e 100644 --- a/lib/rxp-hpp.js +++ b/lib/rxp-hpp.js @@ -442,6 +442,13 @@ var RealexHpp = (function () { if (!internal.isMessageFromHpp(e.event.origin, hppUrl)) { return; } + + //check if the current event is an error + if (e.instance.events && e.instance.events.onError && e.event.data.startsWith("Error:")) { + e.instance.events.onError(e); + return; + } + // check for iframe resize values var evtdata; if (e.event.data && (evtdata=internal.decodeAnswer(e.event.data)).iframe) { @@ -768,4 +775,4 @@ var RealexHpp = (function () { _internal: internal }; -}()); \ No newline at end of file +}());