aboutsummaryrefslogtreecommitdiff
path: root/stack-core.el
diff options
context:
space:
mode:
Diffstat (limited to 'stack-core.el')
-rw-r--r--stack-core.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/stack-core.el b/stack-core.el
index 7b86de1..294bce1 100644
--- a/stack-core.el
+++ b/stack-core.el
@@ -167,6 +167,12 @@ entire response as a complex alist."
(error "Response corrupted")
(delete-region (point-min) (point))
(buffer-string)))))))
+ (when (assoc 'error_id response)
+ (error "Request failed: (%s) [%i %s] %s"
+ method
+ (cdr (assoc 'error_id response))
+ (cdr (assoc 'error_name response))
+ (cdr (assoc 'error_message response))))
(setq stack-core-remaining-api-requests
(cdr (assoc 'quota_remaining response)))
(when (< stack-core-remaining-api-requests