Skip to content

Commit

Permalink
remove change to behaviour on 500 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Brignull committed May 1, 2020
1 parent cffc0f7 commit e52e34b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/upload-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/upload-lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ async function uploadPayload(payload) {
// Sleep for the backoff period
await new Promise(r => setTimeout(r, backoffPeriods[attempt] * 1000));

} else if (res.message.statusCode === 500) {
// If the upload fails with 500 then we assume it is a temporary problem
// with turbo-scan and not an error that the user has caused or can fix.
// We avoid marking the job as failed to avoid breaking CI workflows.
core.error('Upload failed (' + requestID + '): ' + await res.readBody());

} else {
core.setFailed('Upload failed (' + requestID + '): ' + await res.readBody());
}
Expand Down

0 comments on commit e52e34b

Please sign in to comment.