Let's replace this with logic similar to the exception-cause? function used in Clojure. That will be more robust than just checking one level deep in the exception stack.