diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-04-13 16:40:50 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-04-13 16:40:50 -0500 |
commit | b25ba79490a22d22edf9088545fd15addb9890ca (patch) | |
tree | 5fa3a4906d183d959bb5890ca6dd59e1df5ca82d | |
parent | 4f90c08f481bf1e60f058983b033cbf26ff0d265 (diff) |
nicer error printing
-rw-r--r-- | granolin.lisp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/granolin.lisp b/granolin.lisp index 0fff9b4..583d46b 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -453,7 +453,7 @@ (url (format nil +join-room-path+ room-id))) (send (client url body :method :post :wrap make-basic-json) t ; do nothing in case of success - (format *error-output* "FAILED to join room: ~a.~%HTTP response: ~a ~a~%" + (format *error-output* "FAILED to join room: ~a.~%HTTP response: ~a ~a~%~%" room-id *response-status* (flexi-streams:octets-to-string *response-body*))))) @@ -476,7 +476,8 @@ :wrap make-basic-json :literal-body t) (getf (basic-json-data *response-object*) :|content_uri|) - (format *error-output* "FAILED to upload content.~%HTTP response: ~a ~a~%" + (format *error-output* "FAILED to upload content: ~a.~%HTTP response: ~a ~a~%~%" + filename *response-status* (flexi-streams:octets-to-string *response-body*))))) @@ -504,7 +505,7 @@ (unwind-protect (loop :while (running-p client) :do (handler-case (sync client) - (error (c) (format *error-output* "error: ~a" c)))) + (error (c) (format *error-output* "Error during Event Sync: ~a~%~%" c)))) (clean-up client))) (defun stop (client) |