Skip to content

Commit 7fc761e

Browse files
committed
improved error messages
1 parent 95ff7cc commit 7fc761e

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

src/commands/app/deploy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default class Deploy extends AppCLIBaseCommand {
100100
);
101101
break;
102102
default:
103-
this.log("Please provide a valid Hosting Type.", "error");
103+
this.log("Provide a valid hosting type.", "error");
104104
return;
105105
}
106106

@@ -207,7 +207,7 @@ export default class Deploy extends AppCLIBaseCommand {
207207
);
208208
url = await this.handleNewProject(config, updateHostingPayload);
209209
} else {
210-
this.log("Please provide a valid launch project.", "error");
210+
this.log("Provide a valid Launch project.", "error");
211211
return;
212212
}
213213

src/messages/index.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
const errors = {
2-
NOT_EMPTY: "{value} cannot be empty.",
3-
INVALID_APP_ID: "Please enter a valid app UID.",
2+
NOT_EMPTY: "{value} is required and cannot be empty.",
3+
INVALID_APP_ID: "Enter a valid app UID.",
44
ORG_UID_NOT_FOUND:
55
"Organization UID not found. Please enter a valid organization UID.",
6-
BASE_URL_EMPTY: "Developer Hub URL cannot be empty.",
7-
INVALID_ORG_UID: "Please enter a valid organization UID.",
6+
BASE_URL_EMPTY: "Developer Hub URL is required.",
7+
INVALID_ORG_UID: "Enter a valid organization UID.",
88
PATH_NOT_FOUND:
9-
"Failed to locate the provided path '{path}'. Please enter a valid path.",
9+
"Path {path} not found. Enter a valid path.",
1010
INVALID_NAME:
11-
"Please enter a valid name that is {min} to {max} characters long.",
11+
"Name must be between {min} and {max} characters.",
1212
FILE_GENERATION_FAILURE:
13-
"Failed to generate the file! Please try running the command again.",
14-
APP_CREATION_FAILURE: "App could not be registered on Developer Hub.",
13+
"File generation failed. Try running the command again.",
14+
APP_CREATION_FAILURE: "Failed to register app on Developer Hub.",
1515
APP_UID_NOT_MATCH:
16-
"Provided app UID is not matching with the app manifest.json app UID",
16+
"App UID doesn't match the value in manifest.json.",
1717
APP_CREATION_CONSTRAINT_FAILURE:
18-
"App could not be registered. Please go through the constraints on the app name and try running the command again.",
18+
"App registration failed. Check the name constraints and try again.",
1919
APP_CREATE_FAILURE_AND_ROLLBACK:
20-
"App creation should fail and rollback",
20+
"App creation failed. Changes have been rolled back.",
2121
APP_INVALID_ORG:
22-
"App could not be registered. Please verify the inputs and try again.",
22+
"App registration failed. Verify the inputs and try again.",
2323
DUPLICATE_APP_NAME:
24-
"The {appName} app already exists. Please create an app with a different name.",
24+
"App {appName} already exists. Use a different name.",
2525
INVALID_URL:
26-
"Please enter a valid URL. The URL should start with http:// or https://",
26+
"Enter a valid URL starting with http:// or https://.",
2727
};
2828

2929
const commonMsg = {
3030
CONFIG: "Path of the external config",
3131
MAX_RETRY_LIMIT: "Maximum retry limit reached.",
32-
MAX_RETRY_LIMIT_WARN: "warn: Maximum retry limit reached.\n",
32+
MAX_RETRY_LIMIT_WARN: "Warning: Retry limit reached.",
3333
PROVIDE_ORG_UID: "Provide the organization UID to fetch the app details for the operation.",
3434
CURRENT_WORKING_DIR: "Current working directory.",
3535
SKIP_CONFIRMATION: "Use this flag to skip the confirmation.",
3636
DEVELOPER_HUB_URL_PROMPT:
3737
"Enter the Developer Hub Base URL for the {name} region: ",
3838
APP_UID: "Provide the app UID of an existing app.",
3939
APP_TYPE_DESCRIPTION: "Type of app",
40-
CONTACT_SUPPORT: "Please contact the support team.",
40+
CONTACT_SUPPORT: "Contact the support team for help.",
4141
STACK_API_KEY: "API key of the stack where the app operation is to be performed.",
4242
USER_TERMINATION: "Process terminated by the user.",
43-
CLI_APP_CLI_LOGIN_FAILED: 'You are not logged in. Please login with command $ csdx auth:login'
43+
CLI_APP_CLI_LOGIN_FAILED: "You're not logged in. Run $ csdx auth:login to continue."
4444
};
4545

4646
const appCreate = {
@@ -130,7 +130,7 @@ const deployAppMsg = {
130130
HOSTING_TYPE: "Choose a valid Hosting Type.",
131131
CONFIG_FILE: "[optional] Please enter the path of the config file.",
132132
APP_UPDATE_TERMINATION_MSG: "The app is already connected to the Launch project. Skipping the app hosting updates process.",
133-
DISCONNECT_PROJECT: "Are you sure you wan to disconnect the Launch project?",
133+
DISCONNECT_PROJECT: "Disconnect the Launch project? This action can't be undone.",
134134
PROJECT_NOT_FOUND: "We couldn't find the project. Please enter a valid project name.",
135135
PROJECT_NAME_CONFLICT_FAILED: "Unable to resolve the project name conflict."
136136
}

0 commit comments

Comments
 (0)