diff options
author | Stan Hu <stanhu@gmail.com> | 2018-06-05 22:34:06 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-06-06 01:40:55 -0700 |
commit | 3a722ff53fe86ce6194f81ade810196f4f8e870c (patch) | |
tree | 86e7e1b0f8ff5baf148f8f3d03314f942ed0465d /app/controllers/import/google_code_controller.rb | |
parent | af07c490b2a32ed4c88e387d1133e7882f79abc5 (diff) | |
download | gitlab-ce-3a722ff53fe86ce6194f81ade810196f4f8e870c.tar.gz |
Show a more helpful error for import status
Importing a project from GitHub for a project namespace that already exists
would show an unhelpful error, "An error occurred while importing project."
We now add the base message from Projects::CreateService when this fails.
Closes #47365
Diffstat (limited to 'app/controllers/import/google_code_controller.rb')
-rw-r--r-- | app/controllers/import/google_code_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/import/google_code_controller.rb b/app/controllers/import/google_code_controller.rb index 9b26a00f7c7..3bce27e810a 100644 --- a/app/controllers/import/google_code_controller.rb +++ b/app/controllers/import/google_code_controller.rb @@ -92,7 +92,7 @@ class Import::GoogleCodeController < Import::BaseController if project.persisted? render json: ProjectSerializer.new.represent(project) else - render json: { errors: project.errors.full_messages }, status: :unprocessable_entity + render json: { errors: project_save_error(project) }, status: :unprocessable_entity end end |