@@ -167,7 +167,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateR
167
167
} else {
168
168
if repo != nil {
169
169
if err = models .DeleteRepository (ctx .User .ID , repo .ID ); err != nil {
170
- log .Error (4 , "DeleteRepository: %v" , err )
170
+ log .Error (2 , "DeleteRepository: %v" , err )
171
171
}
172
172
}
173
173
ctx .Error (500 , "CreateRepository" , err )
@@ -221,7 +221,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
221
221
}
222
222
return
223
223
} else if ! org .IsOrganization () {
224
- ctx .Error (403 , "" , err )
224
+ ctx .Error (403 , "" , "Given user is not an organization" )
225
225
return
226
226
}
227
227
ctxUser = org
@@ -235,7 +235,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
235
235
if ctxUser .IsOrganization () && ! ctx .User .IsAdmin {
236
236
// Check ownership of organization.
237
237
if ! ctxUser .IsOwnedBy (ctx .User .ID ) {
238
- ctx .Error (403 , "" , "Given user is not owner of organization. " )
238
+ ctx .Error (403 , "" , "Given user is not owner of organization" )
239
239
return
240
240
}
241
241
}
@@ -248,7 +248,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
248
248
case addrErr .IsURLError :
249
249
ctx .Error (422 , "" , err )
250
250
case addrErr .IsPermissionDenied :
251
- ctx .Error (422 , "" , "You are not allowed to import local repositories. " )
251
+ ctx .Error (422 , "" , "You are not allowed to import local repositories" )
252
252
case addrErr .IsInvalidPath :
253
253
ctx .Error (422 , "" , "Invalid local path, it does not exist or not a directory." )
254
254
default :
@@ -270,7 +270,7 @@ func Migrate(ctx *context.APIContext, f form.MigrateRepo) {
270
270
if err != nil {
271
271
if repo != nil {
272
272
if errDelete := models .DeleteRepository (ctxUser .ID , repo .ID ); errDelete != nil {
273
- log .Error (4 , "DeleteRepository: %v" , errDelete )
273
+ log .Error (2 , "DeleteRepository: %v" , errDelete )
274
274
}
275
275
}
276
276
ctx .Error (500 , "MigrateRepository" , models .HandleMirrorCredentials (err .Error (), true ))
0 commit comments