From 109103ee47da299c04ffdcabebc38bcd665555d9 Mon Sep 17 00:00:00 2001 From: Pawel Kowalczyk Date: Mon, 16 Jul 2018 12:57:40 +0200 Subject: [PATCH] handle-errors Feature #13781 Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk --- src/store/project/project-action.ts | 2 +- src/views-components/dialog-create/dialog-project-create.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/project/project-action.ts b/src/store/project/project-action.ts index f7708ebe89..2d59a4842b 100644 --- a/src/store/project/project-action.ts +++ b/src/store/project/project-action.ts @@ -46,7 +46,7 @@ export const createProject = (project: Partial) => return projectService .create(projectData) .then(project => dispatch(actions.CREATE_PROJECT_SUCCESS(project))) - .catch(() => dispatch(actions.CREATE_PROJECT_ERROR("Could not create a project"))); + .catch((response) => dispatch(actions.CREATE_PROJECT_ERROR(response.response.data.errors))); }; export type ProjectAction = UnionOf; diff --git a/src/views-components/dialog-create/dialog-project-create.tsx b/src/views-components/dialog-create/dialog-project-create.tsx index 91e23bebbf..48b89115e4 100644 --- a/src/views-components/dialog-create/dialog-project-create.tsx +++ b/src/views-components/dialog-create/dialog-project-create.tsx @@ -73,7 +73,7 @@ class DialogProjectCreate extends React.Component} /> - +