Skip to content

Commit

Permalink
fix: avoid empty and string rejects (#12818)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amplifiyer committed Jun 16, 2023
1 parent 84cad9e commit 911faa7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function waitJobToSucceed(job, amplifyClient) {
return new Promise(async (resolve, reject) => {
const timeout = setTimeout(() => {
console.log('Job Timeout before succeeded');
reject();
reject(new Error('Job Timeout before succeeded'));
}, 1000 * 60 * 10);
let processing = true;
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/amplify-console-hosting/src/utils/build-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const DIR_NOT_FOUND_ERROR_MESSAGE = 'Please ensure your build artifacts path exi
function zipFile(sourceDir, destFilePath, extraFiles) {
return new Promise((resolve, reject) => {
if (!fs.pathExistsSync(sourceDir)) {
reject(DIR_NOT_FOUND_ERROR_MESSAGE);
reject(new Error(DIR_NOT_FOUND_ERROR_MESSAGE));
}
const zipFilePath = destFilePath;
const output = fs.createWriteStream(zipFilePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const adminLoginFlow = async (context: $TSContext, appId: string, envName
}
finished = true;
adminLoginServer.shutdown();
reject();
resolve();
};
});

Expand Down Expand Up @@ -116,7 +116,7 @@ export const adminLoginFlow = async (context: $TSContext, appId: string, envName
}
finished = true;
closeReadline(rl);
reject();
resolve();
};
});
return [promise, cancel];
Expand Down

0 comments on commit 911faa7

Please sign in to comment.