-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
chore: additional context on protocol upload network errors #28986
Conversation
…in protocol uploads
1 flaky test on run #54401 ↗︎
Details:
cypress/e2e/specs_list_latest_runs.cy.ts • 1 flaky test • app-e2e
Review all test suite changes for PR #28986 ↗︎ |
@@ -323,7 +323,17 @@ export class ProtocolManager implements ProtocolManagerShape { | |||
} | |||
} | |||
|
|||
const errorMessage = await res.json().catch(() => res.statusText) | |||
const errorMessage = await res.json().catch(() => { | |||
const url = new URL(uploadUrl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't imagine why this wouldn't be a valid url, but should we gaurd against if this ends up raising an error as invalid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While investigating this, I don't think we need to guard at this point, because this code is unreachable if uploadUrl
is not a valid URL: fetch
on L#305 will throw in this case, which gets caught on L#345.
* chore: release 13.7.0 * fix incorrect regression note in changelog * Update cli/CHANGELOG.md Co-authored-by: Matt Schile <mschile@cypress.io> * changelog entries for #28986 --------- Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Matt Schile <mschile@cypress.io>
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
HTTP status codes and URLs that fail are useful data when investigating network errors. Previously, we were only reporting the status text.
In order to reduce time spent on uploading capture databases in a failure state, retry count has been reduced from 7 to 2, for 3 total attempts.
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?