use sendStatus for status codes, prevents errors in logs GitOrigin-RevId: 98613a3c894a01eb9112fa9472403caeeae45bc2