branch: elpa/fedi
commit 772f1725e2ee46f4b12763fa2e95aeaca6b0d4d4
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
attempted error handle in http.el
---
fedi-http.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fedi-http.el b/fedi-http.el
index 92061e23ac1..3823cbe2949 100644
--- a/fedi-http.el
+++ b/fedi-http.el
@@ -108,8 +108,11 @@ SILENT means don't message."
"Determine if RESPONSE was successful.
Call SUCCESS if successful. Message status and JSON error from
RESPONSE if unsuccessful."
- (let ((status (with-current-buffer response
- (fedi-http--status))))
+ (let ((status (condition-case err
+ (with-current-buffer response
+ (fedi-http--status))
+ (wrong-type-argument
+ "Looks like we got no response from the server."))))
(if (string-prefix-p "2" status)
(funcall success)
(if (string-prefix-p "404" status)