Expanded Issue Transfer Error Messaging

Rather than discarding the error message when
the issue transfer fails, we should give it in the
console so that the user can correct it.
This commit is contained in:
Christopher Allford 2022-03-18 11:24:27 -07:00
parent 8efe01fe8c
commit 9287018d86
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();