mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-27 15:22:38 +00:00
[project-history] log context of failed history-v1 requests (#23078)
GitOrigin-RevId: a597efc46e00fc07cc6e5b71938c82f513c0b288
This commit is contained in:
parent
c300d0adb1
commit
36c9772e0e
1 changed files with 3 additions and 3 deletions
|
@ -557,11 +557,11 @@ function _requestHistoryService(options, callback) {
|
|||
if (res.statusCode >= 200 && res.statusCode < 300) {
|
||||
callback(null, body)
|
||||
} else {
|
||||
const { method, url, qs } = requestOptions
|
||||
error = new OError(
|
||||
`history store a non-success status code: ${res.statusCode}`
|
||||
`history store a non-success status code: ${res.statusCode}`,
|
||||
{ method, url, qs, statusCode: res.statusCode }
|
||||
)
|
||||
error.statusCode = res.statusCode
|
||||
error.body = body
|
||||
logger.warn({ err: error }, error.message)
|
||||
callback(error)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue