1
0
Fork 0

- [GUI] returned a more useful error message to user when an error occurred while refreshing posts from gemlogs.

This commit is contained in:
cage 2024-02-25 16:40:03 +01:00
parent 904fb6cf7e
commit cbcc7c294b
1 changed files with 7 additions and 3 deletions

View File

@ -58,12 +58,16 @@
:contents table)))
(defun gemini-gemlog-refresh-subscription (gemlog-url)
(list (cons "url" gemlog-url)
(cons "new-posts" (gemini-subscription:refresh-subscription-low-level gemlog-url))))
(handler-case
(list (cons "url" gemlog-url)
(cons "new-posts" (gemini-subscription:refresh-subscription-low-level gemlog-url)))
(error (e)
(error (format nil (_ "Error getting posts from ~s: ~a") gemlog-url e)))))
(defclass gemini-gemlog-subscriptions-refreshed (box) ())
(defmethod yason:encode ((object gemini-gemlog-subscriptions-refreshed) &optional (stream *standard-output*))
(defmethod yason:encode ((object gemini-gemlog-subscriptions-refreshed)
&optional (stream *standard-output*))
(encode-flat-array-of-plists (unbox object) stream))
(defun gemini-gemlog-refresh-all-subscriptions ()