Skip to content

Commit

Permalink
Merge pull request #2037 from Automattic/add/error-message-update-pri…
Browse files Browse the repository at this point in the history
…mary-domain

Also outputs command output message when import fails on the `update_primary_domain` step.
  • Loading branch information
brunobasto authored Sep 19, 2024
2 parents 8b50b2b + 36c5301 commit ddcba3f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/site-import/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,20 @@ The server said:
message += 'Please contact support and include this message along with your sql file.';
}

break;
case 'update_primary_domain':
message += `\nThis error occurred during the update of the primary domain.
${ rollbackMessage }
`;
if ( importFailed.commandOutput ) {
const commandOutput = ( [] as string[] ).concat( importFailed.commandOutput ).join( ';' );
message += `
Please inspect your input file and make the appropriate corrections before trying again.
The server said:
> ${ chalk.red( commandOutput ) }
`;
}
break;
default:
}
Expand Down

0 comments on commit ddcba3f

Please sign in to comment.