(ex-message ex)
Returns the message attached to the given Error / ExceptionInfo object. For non-Errors returns nil.
(defn ex-message [ex] (when (instance? js/Error ex) (.-message ex)))