use sendStatus for status codes, prevents errors in logs GitOrigin-RevId: 98613a3c894a01eb9112fa9472403caeeae45bc2
@@ -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 {
}
@@ -37,7 +37,10 @@ describe('AnalyticsController', function() {
})
- this.res = { send() {} }
+ this.res = {
+ send() {},
+ sendStatus() {}
+ }
describe('updateEditingSession', function() {