 
 (defun fstar-subp--pos-check-wrapper (pos continuation)
   "Construct a continuation that runs CONTINUATION if point is POS.
-Otherwise, call CONTINUATION with nil.  Same if the query fails.
-If POS is nil, the POS check is ignored."
+Otherwise, call CONTINUATION with nil.  If POS is nil, the POS
+check is ignored."
   (declare (indent 1))
   (lambda (status response)
-    (if (and (eq status 'success) (or (null pos) (eq (point) pos)))
-        (funcall continuation response)
-      (funcall continuation nil))))
+    (if (or (null pos) (eq (point) pos))
+        (funcall continuation status response)
+      (funcall continuation 'interrupted nil))))
 
 (defun fstar-subp--lookup-wrapper (pos continuation)
   "Handle the results of a lookup query at POS.

function can also handle results of position-less lookup queries."
  (declare (indent 1))
  (fstar-subp--pos-check-wrapper pos
    (lambda (response)
      (-if-let* ((info (and response (if (fstar--has-feature 'json-subp)
                                         (fstar-subp-json--parse-info response)
                                       (fstar-subp-legacy--parse-info response)))))
          (funcall continuation info)
        (funcall continuation nil)))))


                (fstar-subp--pos-check-wrapper (point)
                  (apply-partially #'fstar--insert-match-continuation type))))

(defun fstar--destruct-var-continuation (from to type status response)
  "Replace FROM..TO (with TYPE) with match from RESPONSE.
STATUS is the original query's status."
  (pcase (and (eq status 'success) (split-string response "\n"))
    (`nil
     (message "No match found for type `%s'." type))
    (`(,_name ,branch)
