Skip to content

Commit bc90add

Browse files
committed
Add constants and add error message
1 parent 970b9be commit bc90add

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

commands/utils/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ constants.stage = {
44
AUTH_URL: "https://stage-api.lambdatestinternal.com/storybook/auth",
55
RENDER_API_URL: "https://stage-api.lambdatestinternal.com/storybook/render",
66
BUILD_STATUS_URL: "https://stage-api.lambdatestinternal.com/storybook/status",
7-
BASE_URL: "https://stage-api.lambdatestinternal.com"
7+
BASE_URL: "https://stage-api.lambdatestinternal.com",
8+
SB_BUILD_VALIDATE_PATH: "/storybook/validate"
89
};
910
constants.prod = {
1011
AUTH_URL: "https://api.lambdatest.com/storybook/auth",

commands/utils/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ async function validateStorybookDir(dir) {
6363

6464
async function validateLatestBuild(options) {
6565
let commit = await getLastCommit();
66-
return axios.get(new URL('/storybook/validate', constants[options.env].BASE_URL).href, {
66+
return axios.get(new URL(constants[options.env].SB_BUILD_VALIDATE_PATH, constants[options.env].BASE_URL).href, {
6767
headers: {
6868
projectToken: process.env.PROJECT_TOKEN
6969
},
@@ -80,7 +80,7 @@ async function validateLatestBuild(options) {
8080
})
8181
.catch(function (error) {
8282
// TODO: Add retries
83-
console.log('[smartui] Error: Cannot connect with SmartUI platform.')
83+
console.log('[smartui] Error: ', error.message);
8484
process.exit(1);
8585
});
8686
}

0 commit comments

Comments
 (0)