[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 5e31b1b484 15/27: http: some hack error handling
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 5e31b1b484 15/27: http: some hack error handling in get-response |
Date: |
Fri, 23 Feb 2024 13:00:55 -0500 (EST) |
branch: elpa/mastodon
commit 5e31b1b484736b771b58a5d153b7e6e8f22cb364
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>
http: some hack error handling in get-response
---
lisp/mastodon-http.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 541c92e66f..a345324ca5 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -179,8 +179,14 @@ PARAMS is an alist of any extra parameters to send with
the request.
SILENT means don't message.
NO-HEADERS means don't collect http response headers.
VECTOR means return json arrays as vectors."
- (with-current-buffer (mastodon-http--get url params silent)
- (mastodon-http--process-response no-headers vector)))
+ (let ((buf (mastodon-http--get url params silent)))
+ ;; (if (not buf)
+ ;; (error "Request returned nada")
+ (condition-case x
+ (with-current-buffer buf
+ (mastodon-http--process-response no-headers vector))
+ (wrong-type-argument
+ (error "Request returned nada")))))
(defun mastodon-http--get-json (url &optional params silent vector)
"Return only JSON data from URL request.
- [nongnu] elpa/mastodon 4a8a102b3b 01/27: Count characters directly from string, (continued)
- [nongnu] elpa/mastodon 4a8a102b3b 01/27: Count characters directly from string, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon aa4e01e5cd 16/27: toot: defcustom emojify in compose, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 3d558edff6 04/27: Tweak display actions to better preserve defaults, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 5977495b8a 20/27: move condition case from http get-response to credential-account, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 379e1edc27 12/27: read me, var index, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 11be568c1e 09/27: my-profile: load by id, rather than server search, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 8e48dc0d5f 26/27: readme typo, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 63120440fa 18/27: string-trim-left on remove-docs, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon af029656fa 14/27: comment re return-creds-acc, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 1fa432d27c 11/27: toot.el: use all emoji for : capf, and get text annotation, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 5e31b1b484 15/27: http: some hack error handling in get-response,
ELPA Syncer <=
- [nongnu] elpa/mastodon 9caa0b58ea 10/27: docstrings, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 445d176b2a 02/27: Replace 'switch-to-buffer' with 'display-buffer' or 'pop-to-buffer', ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 58ec54b666 17/27: update: skip scheduled-statuses view, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon d66e27be92 23/27: Merge branch 'develop', ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 2e6bcd41a9 05/27: Use pop-to-buffer so that new window is selected, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 6a5152b6cb 03/27: Use 'read-buffer' to choose a buffer, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 51132d0868 08/27: Merge pull request 'Use display-buffer to allow customization' (#522) from rahguzar/mastodon.el:display-buffer into develop, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 25bae1042f 25/27: Merge branch 'develop', ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon c84630f0f1 27/27: readme: add nb re .info docs, ELPA Syncer, 2024/02/23
- [nongnu] elpa/mastodon 87b0b347b5 13/27: readme completion, ELPA Syncer, 2024/02/23