summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/migrate.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/migrate.go')
-rw-r--r--routers/api/v1/repo/migrate.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go
index 019d82031c..f9cddbb7cd 100644
--- a/routers/api/v1/repo/migrate.go
+++ b/routers/api/v1/repo/migrate.go
@@ -198,6 +198,8 @@ func handleMigrateError(ctx *context.APIContext, repoOwner *models.User, remoteA
switch {
case models.IsErrRepoAlreadyExist(err):
ctx.Error(http.StatusConflict, "", "The repository with the same name already exists.")
+ case models.IsErrRepoFilesAlreadyExist(err):
+ ctx.Error(http.StatusConflict, "", "Files already exist for this repository. Adopt them or delete them.")
case migrations.IsRateLimitError(err):
ctx.Error(http.StatusUnprocessableEntity, "", "Remote visit addressed rate limitation.")
case migrations.IsTwoFactorAuthError(err):