[error] request--callback: peculiar error: 500
I tried several times to setup wallabag.el but I have this error. What do I do wrong ? I am not on a server of my own.
Double check the wallabag version, maybe you need to update the server.
I updated the patch, how about now?
I'm getting this error too. Specifically, wallabag-request-and-insert-entries returns
{"error":{"code":500,"message":"Internal Server Error"}}
in its data payload. However, wallabag-request-token did successfully connect to the Wallabag instance and obtain an access token. I ran the same query that wallabag-request-new-entries runs but using curl + the access token and it returned entries.
My Wallabag instance is docker based, and updated to the latest version.
Ok, I discovered the error. I am starting from an empty db. In the success callback for wallabag-request-new-entries,
(cl-function
(lambda (&key data &allow-other-keys)
(setq entries (append (wallabag-parse-json (json-read-from-string data)) nil))
(let* ((latest-id (alist-get 'id (car entries)))
(max-id (or (caar (wallabag-db-sql `[:select id :from items :order :by id :desc :limit 1])) 0))
(number-of-retrieved (- latest-id max-id)))
(cond
((= number-of-retrieved 0)
(message "No New Entries")
(setq wallabag-retrieving-p nil))
((< number-of-retrieved 0) ;; the actual number may be less than (abs number-of-retrieved)
(wallabag-request-and-delete-entries (abs number-of-retrieved)))
(t
;; (message "Found there may have %s new articles." number-of-retrieved)
(wallabag-request-and-insert-entries number-of-retrieved))))))
my max-id is 0 since the db is empty, and latest-id is 9530 (I have a 10+ year collection of articles on Wallabag.)
This asks wallabag-request-and-delete-entries to retrieve 9530 entries, which is too many for the server to return in one go (perPage=9530). A fix might be to make a looping request in batches of 100 entries per page.
Update: I proposed a fix in #14.