From 47d3d3ae4a5efc68bcd83a720c232184291c3b31 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 13 Jul 2021 18:57:09 +0100 Subject: [PATCH] errors: Handle Inapplicable errors in the client Signed-off-by: Ian Jackson --- templates/script.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/templates/script.ts b/templates/script.ts index f65d97d6..ff132745 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -2009,8 +2009,13 @@ update_error_handlers.PieceOpError = function let cseq = m.state.cseq; let p = pieces[piece]; console.log('ERROR UPDATE PIECE ', piece, cseq, m, m.error_msg, p); - if (p == null) return; - let conflict_expected = piece_error_handlers[m.error](piece, p, m); + if (p == null) return; // who can say! + if (m.error != 'Conflict') { + // Our gen was high enough we we sent this, that it ought to have + // worked. Report it as a problem, then. + add_log_message('Problem manipulating piece: ' + m.error_msg); + p.cseq = null; // Well, we don't have anything outstanding now + } handle_piece_update(m.state); } -- 2.30.2