-
- Downloads
Check email test errors for javax.mail.AuthenticationFailedException (#23921)
* Check email test errors for javax.mail.AuthenticationFailedException Authing with Office365 led to a less-than-great user experience. If you type in the wrong username or password, we would display an unhelpful message: > Sorry, something went wrong. Please try again. Error::Exception reading response.Read timed out. This is an error from an inner nested exception which looks like: ```clojure (javax.mail.AuthenticationFailedException. "" ;; Office365 returns auth exception with no message so we only saw "Read timed out" prior (javax.mail.MessagingException. "Exception reading response" (java.net.SocketTimeoutException. "Read timed out"))) ``` We didn't get any message from the AuthenticationFailedException so our humanization strategy only went on the underlying "Read timed out". Now we can check against the error class and use that information. * Little bit of clarity better function name (`check` -> `match-error`), better arg name ( `regex|exception-class` -> `regex-or-exception-class`), full argument names `m` -> `message` and `es` -> `exceptions`
Please register or sign in to comment