From 805bd238db41a7f01889b57b6db09f43803b99ae Mon Sep 17 00:00:00 2001 From: louie Date: Fri, 7 Jun 2019 19:47:28 +0800 Subject: [PATCH] Check errors for endpoint multi --- anki-editor.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anki-editor.el b/anki-editor.el index f17aac2..e796937 100644 --- a/anki-editor.el +++ b/anki-editor.el @@ -174,7 +174,10 @@ See https://apps.ankiweb.net/docs/manual.html#latex-conflicts.") .result)) (defun anki-editor--anki-connect-invoke-multi (&rest actions) - (-zip-with (lambda (result handler) (and handler (funcall handler result))) + (-zip-with (lambda (result handler) + (when-let ((err (alist-get 'error result))) + (error err)) + (and handler (funcall handler result))) (anki-editor--anki-connect-invoke-result "multi" `((actions . ,(mapcar #'car actions)))) (mapcar #'cdr actions)))