File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,9 +29,15 @@ export const migrateGit = async (req: OpenApiRequestExt, res: Response): Promise
2929 try {
3030 remoteHasContent = await req . otomi . git . testRemoteConnection ( repoUrl , password , branch , username )
3131 } catch ( e : any ) {
32- const error = { message : `Cannot connect to new git remote: ${ e . message } ` , statusCode : 404 }
33- res . json ( error )
34- return
32+ if ( e . message . includes ( 'not found' ) ) {
33+ const error = { message : `Cannot connect to new git remote: ${ e . message } ` , statusCode : 404 }
34+ res . json ( error )
35+ return
36+ } else {
37+ const error = { message : `Error connecting to new git remote: ${ e . message } ` , statusCode : 400 }
38+ res . json ( error )
39+ return
40+ }
3541 }
3642
3743 // Write config + commit locally → push to new remote (if empty) → push to current remote
You can’t perform that action at this time.
0 commit comments