Open neverfox opened 7 years ago
I cannot handle the ExceptionInfo that is thrown from this function in buddy.sign.jwt, forcing me to use a regular try/catch:
(defn unsign ([message pkey] (unsign message pkey {})) ([message pkey opts] (try (-> (jws/unsign message pkey opts) (codecs/bytes->str) (json/parse-string true) (validate-claims opts)) (catch com.fasterxml.jackson.core.JsonParseException e (throw (ex-info "Message seems corrupt or manipulated." {:type :validation :cause :signature}))))))
(require '[buddy.sign.jwt :as jwt]) ;; never handles (with-handler! #'jwt/unsign clojure.lang.ExceptionInfo (fn [e & args] (raise :jwt-error)))
Is it possibly because an exception is being caught and rethrown?
I cannot handle the ExceptionInfo that is thrown from this function in buddy.sign.jwt, forcing me to use a regular try/catch:
Is it possibly because an exception is being caught and rethrown?