X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ceda57340f34d71fb4289b344e6ca839db06f5e7..f83344568cb070f716527288abe88a4ec5b0c305:/src/store/auth/auth-action.ts diff --git a/src/store/auth/auth-action.ts b/src/store/auth/auth-action.ts index e1b36f82..4ed34875 100644 --- a/src/store/auth/auth-action.ts +++ b/src/store/auth/auth-action.ts @@ -4,7 +4,7 @@ import { ofType, unionize, UnionOf } from '~/common/unionize'; import { Dispatch } from "redux"; -import { reset, stopSubmit, startSubmit } from 'redux-form'; +import { reset, stopSubmit, startSubmit, FormErrors } from 'redux-form'; import { AxiosInstance } from "axios"; import { RootState } from "../store"; import { snackbarActions } from '~/store/snackbar/snackbar-actions'; @@ -143,9 +143,9 @@ export const createSshKey = (data: SshKeyCreateFormDialogData) => } catch (e) { const error = getAuthorizedKeysServiceError(e); if (error === AuthorizedKeysServiceError.UNIQUE_PUBLIC_KEY) { - dispatch(stopSubmit(SSH_KEY_CREATE_FORM_NAME, { publicKey: 'Public key already exists.' })); + dispatch(stopSubmit(SSH_KEY_CREATE_FORM_NAME, { publicKey: 'Public key already exists.' } as FormErrors)); } else if (error === AuthorizedKeysServiceError.INVALID_PUBLIC_KEY) { - dispatch(stopSubmit(SSH_KEY_CREATE_FORM_NAME, { publicKey: 'Public key is invalid' })); + dispatch(stopSubmit(SSH_KEY_CREATE_FORM_NAME, { publicKey: 'Public key is invalid' } as FormErrors)); } } };