Remove special code for handling RequestFailedErrors

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 821826fa56b89176b615e026f11db0b7fcfcbd30
This commit is contained in:
andrew rumble 2024-07-15 12:02:14 +01:00 committed by Copybot
parent 0e89857a9f
commit f54b257022

View file

@ -5,7 +5,7 @@ const _ = require('lodash')
const { URL } = require('url') const { URL } = require('url')
const Path = require('path') const Path = require('path')
const moment = require('moment') const moment = require('moment')
const { fetchJson, RequestFailedError } = require('@overleaf/fetch-utils') const { fetchJson } = require('@overleaf/fetch-utils')
const contentDisposition = require('content-disposition') const contentDisposition = require('content-disposition')
const Features = require('./Features') const Features = require('./Features')
const SessionManager = require('../Features/Authentication/SessionManager') const SessionManager = require('../Features/Authentication/SessionManager')
@ -60,13 +60,7 @@ function loadManifestFromWebpackDevServer(done = function () {}) {
webpackManifest = json webpackManifest = json
done() done()
}) })
.catch(err => { .catch(error => {
let error = err
if (err instanceof RequestFailedError) {
error = new Error(
`webpack responded with statusCode: ${err.response.status}`
)
}
logger.err({ error }, 'cannot fetch webpack manifest') logger.err({ error }, 'cannot fetch webpack manifest')
done(error) done(error)
}) })