mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[misc] fix logger.error(err) and logger.warn(err) calls (#23369)
* [misc] fix logger.error(err) calls
The signature is "logger.error({ err }, 'MESSAGE')".
* [project-history] remove duplicate logger.err calls in health check
The call-site is already logging any errors. Also, the logger.err call
signature was not quite right.
* [web] log userId when removeDropbox/removeGithub hook fails
* [misc] fix logger.warn(err) calls
The signature is "logger.warn({ err }, 'MESSAGE')".
* [misc] fix logger.error(OError.tag(err)) calls
* [web] make eslint happy
GitOrigin-RevId: 7f528113a3f7e9f6293b7d2d45adc079380325bb
This commit is contained in:
@@ -29,7 +29,6 @@ export function check(callback) {
|
||||
OError.tag(err, 'error checking lock for health check', {
|
||||
project_id: projectId,
|
||||
})
|
||||
logger.err(err)
|
||||
return cb(err)
|
||||
} else if ((res != null ? res.statusCode : undefined) !== 200) {
|
||||
return cb(new Error(`status code not 200, it's ${res.statusCode}`))
|
||||
@@ -46,7 +45,6 @@ export function check(callback) {
|
||||
OError.tag(err, 'error flushing for health check', {
|
||||
project_id: projectId,
|
||||
})
|
||||
logger.err(err)
|
||||
return cb(err)
|
||||
} else if ((res != null ? res.statusCode : undefined) !== 204) {
|
||||
return cb(new Error(`status code not 204, it's ${res.statusCode}`))
|
||||
@@ -63,7 +61,6 @@ export function check(callback) {
|
||||
OError.tag(err, 'error getting updates for health check', {
|
||||
project_id: projectId,
|
||||
})
|
||||
logger.err(err)
|
||||
return cb(err)
|
||||
} else if ((res != null ? res.statusCode : undefined) !== 200) {
|
||||
return cb(new Error(`status code not 200, it's ${res.statusCode}`))
|
||||
|
||||
@@ -250,7 +250,7 @@ export function sendChanges(
|
||||
statusCode: error.statusCode,
|
||||
body: error.body,
|
||||
})
|
||||
logger.warn(error)
|
||||
logger.warn({ error, projectId, historyId, endVersion }, error.message)
|
||||
return callback(error)
|
||||
}
|
||||
callback()
|
||||
|
||||
Reference in New Issue
Block a user