mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add more null checks to health check
This commit is contained in:
parent
a964119b5e
commit
1541eb319c
1 changed files with 3 additions and 1 deletions
|
@ -28,9 +28,11 @@ module.exports =
|
||||||
if err?
|
if err?
|
||||||
logger.err err:err, "docstore returned a error in health check get"
|
logger.err err:err, "docstore returned a error in health check get"
|
||||||
cb(err)
|
cb(err)
|
||||||
|
else if !res?
|
||||||
|
cb("no response from docstore with get check")
|
||||||
else if res?.statusCode != 200
|
else if res?.statusCode != 200
|
||||||
cb("status code not 200, its #{res.statusCode}")
|
cb("status code not 200, its #{res.statusCode}")
|
||||||
else if _.isEqual(body.lines, lines) and body._id == doc_id.toString()
|
else if _.isEqual(body?.lines, lines) and body?._id == doc_id.toString()
|
||||||
cb()
|
cb()
|
||||||
else
|
else
|
||||||
cb("health check lines not equal #{body.lines} != #{lines}")
|
cb("health check lines not equal #{body.lines} != #{lines}")
|
||||||
|
|
Loading…
Reference in a new issue