You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The channel init/eligibility/create calls go through the cxm CLI-API gateway
(--cli-api-origin), which only exists for staging and production. Against any
other environment (e.g. integration), or on a transient 5xx, the call failed
with a raw error.
Introduce a typed CliApiError thrown by the gateway helpers in channels.ts and a
shared reportCliApiError() that prints a clear, actionable message (likely cause
+ how to verify --api-host/--cli-api-origin) and exits non-zero instead of
crashing. `channel connect` catches it before writing, so an existing .env.local
is never clobbered; `catalyst create` catches it before cloning, so there's no
partial project.
Refs LTRAC-908
Co-Authored-By: Claude <noreply@anthropic.com>
message: 'Would you like to create a new channel?',
392
-
choices: [
393
-
{name: 'Yes',value: true},
394
-
{name: 'No',value: false},
395
-
],
396
-
});
397
-
}
398
-
399
-
if(shouldCreateChannel){
400
-
constchannelData=awaithandleChannelCreation(
401
-
storeHash,
402
-
accessToken,
403
-
apiHost,
404
-
cliApiOrigin,
405
-
);
406
-
407
-
channelId=channelData.channelId;
408
-
storefrontToken=channelData.storefrontToken;
409
-
envVars={ ...channelData.envVars};
410
-
411
-
consola.success('Channel created successfully.');
412
-
consola.warn(
413
-
'A preview storefront has been deployed in your BigCommerce control panel. This preview may look different from your local environment as it may be running different code. Additionally, it may take a few minutes for the channel storefront to be accessible.',
message: 'Would you like to create a new channel?',
396
+
choices: [
397
+
{name: 'Yes',value: true},
398
+
{name: 'No',value: false},
399
+
],
400
+
});
401
+
}
402
+
403
+
if(shouldCreateChannel){
404
+
constchannelData=awaithandleChannelCreation(
405
+
storeHash,
406
+
accessToken,
407
+
apiHost,
408
+
cliApiOrigin,
409
+
);
410
+
411
+
channelId=channelData.channelId;
412
+
storefrontToken=channelData.storefrontToken;
413
+
envVars={ ...channelData.envVars};
414
+
415
+
consola.success('Channel created successfully.');
416
+
consola.warn(
417
+
'A preview storefront has been deployed in your BigCommerce control panel. This preview may look different from your local environment as it may be running different code. Additionally, it may take a few minutes for the channel storefront to be accessible.',
0 commit comments