error tweaks

pull/4/head
Blake DeMarcy 2017-03-02 21:30:54 -06:00
parent 68087a1c87
commit 0c7ed6b36f
1 changed files with 4 additions and 1 deletions

5
bbj.el
View File

@ -107,7 +107,10 @@ for all JSON tourists."
(setq message (bbj-descend json 'error 'description))
(case (bbj-descend json 'error 'code)
;; haha epic handling
((4 5 6 7) (error message))
(4 (user-error
(if bbj-logged-in message
"Not logged in. Call M-x bbj-login")))
((5 6 7) (user-error message))
(otherwise json)))))