mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
committed by
sharelatex
parent
750a4879e7
commit
0e6b455ab0
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user