Skip to content

Commit 7c20c77

Browse files
committed
[#95] Improve error reporting in the case of missing Ring middleware
1 parent 9045258 commit 7c20c77

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/taoensso/sente.cljx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,9 @@
494494
ppstr)))]
495495

496496
(if (str/blank? client-id)
497-
(warnf "Client's Ring request doesn't have a client id. Does your server have the necessary keyword Ring middleware?: %s" ring-req)
497+
(let [err-msg "Client's Ring request doesn't have a client id. Does your server have the necessary keyword Ring middleware (`wrap-params` & `wrap-keyword-params`)?"]
498+
(errorf (str err-msg \n ring-req \n))
499+
(throw (ex-info err-msg {:ring-req ring-req})))
498500

499501
(if (:websocket? ring-req)
500502
(do ; WebSocket handshake

0 commit comments

Comments
 (0)