mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[misc] keep up with the error signature of dockerode/docker-modem
https://github.com/apocas/docker-modem/blob/v2.1.1/lib/modem.js#L296
This commit is contained in:
parent
77cc3b3cc6
commit
4a19f022fc
2 changed files with 4 additions and 8 deletions
|
@ -99,11 +99,7 @@ module.exports = DockerRunner = {
|
||||||
error,
|
error,
|
||||||
output
|
output
|
||||||
) {
|
) {
|
||||||
if (
|
if (error && error.statusCode === 500) {
|
||||||
__guard__(error != null ? error.message : undefined, x =>
|
|
||||||
x.match('HTTP code is 500')
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
logger.log(
|
logger.log(
|
||||||
{ err: error, project_id },
|
{ err: error, project_id },
|
||||||
'error running container so destroying and retrying'
|
'error running container so destroying and retrying'
|
||||||
|
|
|
@ -202,9 +202,9 @@ describe('DockerRunner', function() {
|
||||||
}
|
}
|
||||||
if (firstTime) {
|
if (firstTime) {
|
||||||
firstTime = false
|
firstTime = false
|
||||||
return callback(
|
const error = new Error('(HTTP code 500) server error - ...')
|
||||||
new Error('HTTP code is 500 which indicates error: server error')
|
error.statusCode = 500
|
||||||
)
|
return callback(error)
|
||||||
} else {
|
} else {
|
||||||
return callback(null, this.output)
|
return callback(null, this.output)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue