mirror of
http://git.whoc.org.uk/git/password-manager.git
synced 2025-01-09 22:50:04 +01:00
Fixed Connection error handling
This commit is contained in:
parent
a509b34c63
commit
91c74f7e89
@ -493,14 +493,18 @@ Clipperz.log(">>> Connection.messageExceptionHandler: " + anError.message, anEr
|
|||||||
if (anError instanceof MochiKit.Async.CancelledError) {
|
if (anError instanceof MochiKit.Async.CancelledError) {
|
||||||
result = anError;
|
result = anError;
|
||||||
} else {
|
} else {
|
||||||
if ((anError.message == 'Trying to communicate without an active connection') ||
|
var errorPayload;
|
||||||
(anError.message == 'No tollManager available for current session')
|
|
||||||
|
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);
|
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');
|
MochiKit.Signal.signal(this, 'EXCEPTION');
|
||||||
} else {
|
} else {
|
||||||
result = anError;
|
result = errorPayload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Clipperz.log("<<< Connection.messageExceptionHandler")
|
Clipperz.log("<<< Connection.messageExceptionHandler")
|
||||||
|
Loading…
Reference in New Issue
Block a user