remove change to behaviour on 500 errors
This commit is contained in:
parent
cffc0f7b4e
commit
e52e34ba17
2 changed files with 12 additions and 0 deletions
6
lib/upload-lib.js
generated
6
lib/upload-lib.js
generated
|
|
@ -83,6 +83,12 @@ async function uploadPayload(payload) {
|
||||||
// Sleep for the backoff period
|
// Sleep for the backoff period
|
||||||
await new Promise(r => setTimeout(r, backoffPeriods[attempt] * 1000));
|
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 {
|
else {
|
||||||
core.setFailed('Upload failed (' + requestID + '): ' + await res.readBody());
|
core.setFailed('Upload failed (' + requestID + '): ' + await res.readBody());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,12 @@ async function uploadPayload(payload) {
|
||||||
// Sleep for the backoff period
|
// Sleep for the backoff period
|
||||||
await new Promise(r => setTimeout(r, backoffPeriods[attempt] * 1000));
|
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 {
|
} else {
|
||||||
core.setFailed('Upload failed (' + requestID + '): ' + await res.readBody());
|
core.setFailed('Upload failed (' + requestID + '): ' + await res.readBody());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue