diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-03-02 22:00:09 -0300 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-03-02 22:00:09 -0300 |
commit | 8ff5999ab30a285f223ae63bef748120a8387ca7 (patch) | |
tree | 7cebea67055bab0062e63d8748b23bcca71cad93 | |
parent | c151212966039601193f99698536e9284c98073c (diff) |
Simpler response error
-rw-r--r-- | sx-request.el | 5 |
1 files changed, 2 insertions, 3 deletions
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 |