Skip to content

Commit

Permalink
[fix] [#346] [#340] Malformed :chsk/bad-package error
Browse files Browse the repository at this point in the history
This was unfortunately preventing clients from manually handling malformed packages,
and leading to confusing errors (e.g. #340).
  • Loading branch information
ptaoussanis committed Mar 7, 2023
1 parent cc84303 commit da73f03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/taoensso/sente.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@
(defn- unpack "packed->[clj ?cb-uuid]"
[packer packed]
(let [[packed ?format] (parse-packed packed)
unpacked #_[clj ?cb-uuid]
unpacked ; [clj ?cb-uuid]
(try
(interfaces/unpack packer packed)
(catch #?(:clj Throwable :cljs :default) t
(debugf "Bad package: %s (%s)" packed t)
[:chsk/bad-package packed]))
(timbre/warnf t "Bad package: %s" packed)
[[:chsk/bad-package packed] nil]))

[clj ?cb-uuid]
(case ?format
Expand Down

0 comments on commit da73f03

Please sign in to comment.