diff --git a/frontend/delta/js/Clipperz/PM/Connection.js b/frontend/delta/js/Clipperz/PM/Connection.js index 3b16568..57076ee 100644 --- a/frontend/delta/js/Clipperz/PM/Connection.js +++ b/frontend/delta/js/Clipperz/PM/Connection.js @@ -493,14 +493,18 @@ Clipperz.log(">>> Connection.messageExceptionHandler: " + anError.message, anEr if (anError instanceof MochiKit.Async.CancelledError) { result = anError; } else { - if ((anError.message == 'Trying to communicate without an active connection') || - (anError.message == 'No tollManager available for current session') + var errorPayload; + + errorPayload = Clipperz.Base.evalJSON(anError.req.responseText); + if ((errorPayload.message == 'Trying to communicate without an active connection') || + (errorPayload.message == 'No tollManager available for current session') || + (errorPayload.message == 'HashCash verification failed. The provided toll is not valid.') ) { result = this.reestablishConnection(anOriginalMessageArguments); - } else if (anError.message == 'Session with stale data') { + } else if (errorPayload.message == 'Session with stale data') { MochiKit.Signal.signal(this, 'EXCEPTION'); } else { - result = anError; + result = errorPayload; } } Clipperz.log("<<< Connection.messageExceptionHandler")