diff --git a/frontend/src/app/main/ui/auth/login.cljs b/frontend/src/app/main/ui/auth/login.cljs index c43741175..2881458d8 100644 --- a/frontend/src/app/main/ui/auth/login.cljs +++ b/frontend/src/app/main/ui/auth/login.cljs @@ -53,14 +53,15 @@ (.replace js/location redirect-uri) (log/error :hint "unexpected response from OIDC method" :resp (pr-str rsp)))) - (fn [{:keys [type code] :as error}] - (cond - (and (= type :restriction) - (= code :provider-not-configured)) - (st/emit! (ntf/error (tr "errors.auth-provider-not-configured"))) + (fn [cause] + (let [{:keys [type code] :as error} (ex-data cause)] + (cond + (and (= type :restriction) + (= code :provider-not-configured)) + (st/emit! (ntf/error (tr "errors.auth-provider-not-configured"))) - :else - (st/emit! (ntf/error (tr "errors.generic")))))))) + :else + (st/emit! (ntf/error (tr "errors.generic"))))))))) (def ^:private schema:login-form [:map {:title "LoginForm"}