@ibm-cloud/cd-tools 1.11.2 → 1.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cmd/direct-transfer.js +15 -1
- package/package.json +1 -1
package/cmd/direct-transfer.js
CHANGED
|
@@ -505,7 +505,21 @@ async function directTransfer(options) {
|
|
|
505
505
|
|
|
506
506
|
try {
|
|
507
507
|
console.log(`Fetching source group from ID: ${options.groupId}...`);
|
|
508
|
-
|
|
508
|
+
let sourceGroup;
|
|
509
|
+
try {
|
|
510
|
+
sourceGroup = await source.getGroup(options.groupId);
|
|
511
|
+
} catch (err) {
|
|
512
|
+
if (err?.response?.status === 404) {
|
|
513
|
+
console.error(
|
|
514
|
+
`Error: group "${options.groupId}" not found in source region "${options.sourceRegion}".\n` +
|
|
515
|
+
`Tip: -g accepts numeric ID or full group path like "parent/subgroup".`
|
|
516
|
+
);
|
|
517
|
+
return 1;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
console.error(`Error: failed to fetch group "${options.groupId}": ${err?.message || err}`);
|
|
521
|
+
return 1;
|
|
522
|
+
}
|
|
509
523
|
|
|
510
524
|
let destinationGroupPath = options.newGroupSlug || sourceGroup.path;
|
|
511
525
|
|