mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
add missing err check
This commit is contained in:
parent
3cae036c3c
commit
f81d40d573
1 changed files with 4 additions and 1 deletions
|
@ -25,7 +25,10 @@ module.exports =
|
||||||
opts = getOpts("/")
|
opts = getOpts("/")
|
||||||
opts.json = true
|
opts.json = true
|
||||||
request.get opts, (err, res, body)->
|
request.get opts, (err, res, body)->
|
||||||
if res.statusCode != 200
|
if err?
|
||||||
|
logger.err err:err, "Health Check: error getting notification"
|
||||||
|
return callback(err)
|
||||||
|
else if res.statusCode != 200
|
||||||
e = "status code not 200 #{res.statusCode}"
|
e = "status code not 200 #{res.statusCode}"
|
||||||
logger.err err:err, e
|
logger.err err:err, e
|
||||||
return cb(e)
|
return cb(e)
|
||||||
|
|
Loading…
Reference in a new issue