mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
add error handler in tests
This commit is contained in:
parent
6e18d49736
commit
7a0c2900ab
1 changed files with 1 additions and 0 deletions
|
@ -106,6 +106,7 @@ module.exports = TrackChangesClient =
|
||||||
options.encoding = null
|
options.encoding = null
|
||||||
request.get options, (err, res, body) ->
|
request.get options, (err, res, body) ->
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
|
return callback(new Error("empty response from s3")) if not body?
|
||||||
zlib.gunzip body, (err, result) ->
|
zlib.gunzip body, (err, result) ->
|
||||||
return callback(err) if err?
|
return callback(err) if err?
|
||||||
callback(null, JSON.parse(result.toString()))
|
callback(null, JSON.parse(result.toString()))
|
||||||
|
|
Loading…
Reference in a new issue