Check errors for endpoint multi
This commit is contained in:
parent
986b1ee398
commit
805bd238db
1 changed files with 4 additions and 1 deletions
|
@ -174,7 +174,10 @@ See https://apps.ankiweb.net/docs/manual.html#latex-conflicts.")
|
||||||
.result))
|
.result))
|
||||||
|
|
||||||
(defun anki-editor--anki-connect-invoke-multi (&rest actions)
|
(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
|
(anki-editor--anki-connect-invoke-result
|
||||||
"multi" `((actions . ,(mapcar #'car actions))))
|
"multi" `((actions . ,(mapcar #'car actions))))
|
||||||
(mapcar #'cdr actions)))
|
(mapcar #'cdr actions)))
|
||||||
|
|
Loading…
Reference in a new issue