mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-16 12:29:36 +00:00
Merge pull request #2194 from overleaf/ho-res-send-status
use sendStatus for status codes, prevents errors in logs GitOrigin-RevId: 98613a3c894a01eb9112fa9472403caeeae45bc2
This commit is contained in:
parent
750a4879e7
commit
0e6b455ab0
2 changed files with 6 additions and 3 deletions
|
@ -69,10 +69,10 @@ module.exports = {
|
|||
var respondWith = function(error, res, next) {
|
||||
if (error instanceof Errors.ServiceNotConfiguredError) {
|
||||
// ignore, no-op
|
||||
res.send(204)
|
||||
res.sendStatus(204)
|
||||
} else if (error) {
|
||||
next(error)
|
||||
} else {
|
||||
res.send(204)
|
||||
res.sendStatus(204)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,10 @@ describe('AnalyticsController', function() {
|
|||
}
|
||||
})
|
||||
|
||||
this.res = { send() {} }
|
||||
this.res = {
|
||||
send() {},
|
||||
sendStatus() {}
|
||||
}
|
||||
})
|
||||
|
||||
describe('updateEditingSession', function() {
|
||||
|
|
Loading…
Add table
Reference in a new issue