mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 11:01:56 +02:00
[project-history] log context of failed history-v1 requests (#23078)
GitOrigin-RevId: a597efc46e00fc07cc6e5b71938c82f513c0b288
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user