diff --git a/lib/metadataTypes/Journey.js b/lib/metadataTypes/Journey.js index ec007fcc5..27a4ba52d 100644 --- a/lib/metadataTypes/Journey.js +++ b/lib/metadataTypes/Journey.js @@ -1702,18 +1702,33 @@ class Journey extends MetadataType { executedKeyArr.push(await this._checkPublishStatus(statusUrl, key)); } } catch (ex) { - if (ex.message === 'Cannot publish interaction in Published status.') { - Util.logger.info( - ` - ${this.definition.type} ${key} is already published` - ); - } else if (ex.message === 'Cannot publish interaction in Stopped status.') { - Util.logger.warn( - ` - ${this.definition.type} ${key} is already published but stopped. Please resume it manually.` - ); - } else { - Util.logger.error( - `Failed to publish ${this.definition.type} ${key}: ${ex.message}` - ); + switch (ex.message) { + case 'Cannot publish interaction in Published status.': { + Util.logger.info( + ` - ${this.definition.type} ${key}/${version} is already published.` + ); + + break; + } + case 'Cannot publish interaction in Stopped status.': { + Util.logger.warn( + ` - ${this.definition.type} ${key}/${version} is stopped. Please create a new version and publish that.` + ); + + break; + } + case 'Cannot publish interaction in Paused status.': { + Util.logger.warn( + ` - ${this.definition.type} ${key}/${version} is already published but currently paused. Run 'mcdev resume' instead.` + ); + + break; + } + default: { + Util.logger.error( + `Failed to publish ${this.definition.type} ${key}: ${ex.message}` + ); + } } } break;