Check status code in ein:notebooklist-url-retrieve-callback

This commit is contained in:
Takafumi Arakaki 2012-05-13 06:24:46 +02:00
parent 5dc9a28e37
commit 906cb8e236

View file

@ -80,7 +80,9 @@
(defun ein:notebooklist-url-retrieve-callback (status url-or-port)
"Called via `ein:notebooklist-open'."
;; FIXME: check status
(ein:aif (plist-get status :error)
(error "Failed to connect to server '%s'. Got: %S"
(ein:url url-or-port) it))
(let ((data (ein:json-read)))
(kill-buffer (current-buffer))
(with-current-buffer (ein:notebooklist-get-buffer url-or-port)