Towards strict

This commit is contained in:
Manav Rathi
2024-05-24 19:46:02 +05:30
parent 367e09599d
commit acebb86fec
7 changed files with 22 additions and 8 deletions

View File

@@ -58,7 +58,8 @@ function SetPasswordForm(props: SetPasswordFormProps) {
setFieldError("confirm", t("PASSPHRASE_MATCH_ERROR"));
}
} catch (e) {
setFieldError("confirm", `${t("UNKNOWN_ERROR")} ${e.message}`);
const message = e instanceof Error ? e.message : "";
setFieldError("confirm", `${t("UNKNOWN_ERROR")} ${message}`);
} finally {
setLoading(false);
}