Skip to content

Commit ec912b5

Browse files
Merge pull request #134 from browserstack/handle_413_zip_upload
Handle 413 error code for zip upload failed
2 parents e39e632 + 2ebab10 commit ec912b5

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

bin/helpers/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const userMessages = {
1717
BUILD_REPORT_MESSAGE: "See the entire build report here:",
1818
ZIP_UPLOADER_NOT_REACHABLE: "Could not reach BrowserStack APIs. Please check your network or see if you need to whitelist *.browserstack.com",
1919
ZIP_UPLOAD_FAILED: "Zip Upload failed.",
20+
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",
2021
CONFIG_FILE_CREATED: "BrowserStack Config File created, you can now run browserstack-cypress --config-file run",
2122
CONFIG_FILE_EXISTS: "File already exists, delete the browserstack.json file manually. skipping...",
2223
DIR_NOT_FOUND: "Given path does not exist. Failed to create browserstack.json in %s",

bin/helpers/zipUpload.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ const uploadCypressZip = (bsConfig, filePath) => {
4242
} else {
4343
if(resp.statusCode == 401){
4444
reject(Constants.validationMessages.INVALID_DEFAULT_AUTH_PARAMS);
45+
} else if (resp.statusCode == 413) {
46+
reject(Constants.userMessages.ZIP_UPLOAD_LIMIT_EXCEEDED);
4547
} else {
4648
reject(Constants.userMessages.ZIP_UPLOADER_NOT_REACHABLE);
4749
}

0 commit comments

Comments
 (0)