Skip to content

Commit d827832

Browse files
committed
fix e.statusCode check
1 parent 44d599e commit d827832

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/cli/src/oclif/commands/env/set.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class SetEnvCommand extends BaseCommand {
6262
this.log(successMessage(version));
6363
this.logJSON(payload);
6464
} catch (e) {
65-
if (e.statusCode === 409) {
65+
if (e.status === 409) {
6666
this.error(
6767
`App version ${version} is the production version. Are you sure you want to set potentially live environment variables?` +
6868
` If so, run this command again with the --force flag.`,

packages/cli/src/oclif/commands/env/unset.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class UnsetEnvCommand extends BaseCommand {
5656
try {
5757
await callAPI(url, requestOptions);
5858
} catch (e) {
59-
if (e.statusCode === 409) {
59+
if (e.status === 409) {
6060
this.error(
6161
`App version ${version} is the production version. Are you sure you want to unset potentially live environment variables?` +
6262
` If so, run this command again with the --force flag.`,

0 commit comments

Comments
 (0)