From 8ff5999ab30a285f223ae63bef748120a8387ca7 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Mon, 2 Mar 2015 22:00:09 -0300 Subject: Simpler response error --- sx-request.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sx-request.el') diff --git a/sx-request.el b/sx-request.el index bbb0941..546ae94 100644 --- a/sx-request.el +++ b/sx-request.el @@ -195,9 +195,8 @@ the main content of the response is returned." (json-null :null)) (json-read-from-string data))))) (kill-buffer response-buffer) - (when (and (not response) (string-equal data "{}")) - (sx-message "Unable to parse response: %S" response) - (error "Response could not be read by `json-read-from-string'")) + (when (not response) + (error "Invalid response to the url request: %s" data)) ;; If we get here, the response is a valid data structure (sx-assoc-let response (when .error_id -- cgit v1.2.3