diff --git a/bin/helpers/constants.js b/bin/helpers/constants.js index 17eb1afc..1b3380dc 100644 --- a/bin/helpers/constants.js +++ b/bin/helpers/constants.js @@ -17,6 +17,7 @@ const userMessages = { BUILD_REPORT_MESSAGE: "See the entire build report here:", ZIP_UPLOADER_NOT_REACHABLE: "Could not reach BrowserStack APIs. Please check your network or see if you need to whitelist *.browserstack.com", ZIP_UPLOAD_FAILED: "Zip Upload failed.", + ZIP_UPLOAD_LIMIT_EXCEEDED: "The directory size which contains the cypress config file is more than 200 MB. For more info, check out https://www.browserstack.com/docs/automate/cypress/exclude-files", CONFIG_FILE_CREATED: "BrowserStack Config File created, you can now run browserstack-cypress --config-file run", CONFIG_FILE_EXISTS: "File already exists, delete the browserstack.json file manually. skipping...", DIR_NOT_FOUND: "Given path does not exist. Failed to create browserstack.json in %s", diff --git a/bin/helpers/zipUpload.js b/bin/helpers/zipUpload.js index 320caa16..5a1d3f5c 100644 --- a/bin/helpers/zipUpload.js +++ b/bin/helpers/zipUpload.js @@ -42,6 +42,8 @@ const uploadCypressZip = (bsConfig, filePath) => { } else { if(resp.statusCode == 401){ reject(Constants.validationMessages.INVALID_DEFAULT_AUTH_PARAMS); + } else if (resp.statusCode == 413) { + reject(Constants.userMessages.ZIP_UPLOAD_LIMIT_EXCEEDED); } else { reject(Constants.userMessages.ZIP_UPLOADER_NOT_REACHABLE); }