mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #11718 from overleaf/em-cancelled-history-requests
Ignore ERR_STREAM_PREMATURE_CLOSE when proxying requests GitOrigin-RevId: aedfa90cc54da041d1c26da3081b6cd72eb5aeb6
This commit is contained in:
@@ -54,7 +54,9 @@ module.exports = HistoryController = {
|
||||
},
|
||||
})
|
||||
pipeline(getReq, res, function (err) {
|
||||
if (err) {
|
||||
// If the downstream request is cancelled, we get an
|
||||
// ERR_STREAM_PREMATURE_CLOSE.
|
||||
if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
|
||||
logger.warn({ url, err }, 'history API error')
|
||||
next(err)
|
||||
}
|
||||
@@ -353,7 +355,9 @@ module.exports = HistoryController = {
|
||||
const getReq = request({ ...options, method: 'get' })
|
||||
|
||||
pipeline(getReq, res, function (err) {
|
||||
if (err) {
|
||||
// If the downstream request is cancelled, we get an
|
||||
// ERR_STREAM_PREMATURE_CLOSE.
|
||||
if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
|
||||
logger.error({ url, err }, 'history API error')
|
||||
next(err)
|
||||
}
|
||||
@@ -433,7 +437,9 @@ module.exports = HistoryController = {
|
||||
res.status(response.statusCode)
|
||||
prepareZipAttachment(res, `${name}.zip`)
|
||||
pipeline(response, res, err => {
|
||||
if (err) {
|
||||
// If the downstream request is cancelled, we get an
|
||||
// ERR_STREAM_PREMATURE_CLOSE.
|
||||
if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
|
||||
logger.warn(
|
||||
{ err, v1ProjectId, version, retryAttempt },
|
||||
'history s3 proxying error'
|
||||
|
||||
Reference in New Issue
Block a user