Merge pull request #32120 from woocommerce/add/issue-transfer-error-messaging

Expanded Issue Transfer Error Messaging
This commit is contained in:
Christopher Allford 2022-03-18 11:32:27 -07:00 committed by GitHub
commit 88f0fe789a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -447,7 +447,12 @@ export default class TransferIssues extends Command {
return transferIssue.issue.id;
} catch ( err ) {
CliUx.ux.action.stop( 'Failed to migrate issue' );
if ( err instanceof GraphqlResponseError && err.errors ) {
CliUx.ux.action.stop( err.errors[0].message );
} else {
CliUx.ux.action.stop( 'Failed to migrate issue' );
}
return null;
} finally {
CliUx.ux.action.stop();