Skip to content

Handle 413 error code for zip upload failed #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions bin/helpers/zipUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down