mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #300 from sharelatex/revert-295-msw-history-failure
Revert "Bail out if history API request fails"
This commit is contained in:
commit
5ff4493d6b
1 changed files with 3 additions and 8 deletions
|
@ -46,14 +46,9 @@ module.exports = HistoryController =
|
||||||
"X-User-Id": user_id
|
"X-User-Id": user_id
|
||||||
}, (error, response, body) ->
|
}, (error, response, body) ->
|
||||||
return next(error) if error?
|
return next(error) if error?
|
||||||
if 200 <= res.statusCode < 300
|
|
||||||
HistoryManager.injectUserDetails body, (error, data) ->
|
HistoryManager.injectUserDetails body, (error, data) ->
|
||||||
return next(error) if error?
|
return next(error) if error?
|
||||||
res.json data
|
res.json data
|
||||||
else
|
|
||||||
error = new Error("history api responded with non-success code: #{res.statusCode}")
|
|
||||||
logger.error err: error, user_id: user_id, "error proxying request to history api"
|
|
||||||
next(error)
|
|
||||||
|
|
||||||
buildHistoryServiceUrl: (useProjectHistory) ->
|
buildHistoryServiceUrl: (useProjectHistory) ->
|
||||||
# choose a history service, either document-level (trackchanges)
|
# choose a history service, either document-level (trackchanges)
|
||||||
|
|
Loading…
Reference in a new issue