aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorJorropo <admin@jorropo.ovh>2018-07-27 10:13:19 +0200
committerChocobozzz <me@florianbigard.com>2018-07-27 14:12:31 +0200
commita3c1738eeaa3405d12c1c2f3102a24f3d15ebe3c (patch)
tree41db9b8556356d2ff69a519ba260aeff2d0fdc72 /server/middlewares/validators
parent646cfe74ee51fbbe1a94f6c69501c1577cfbba68 (diff)
downloadPeerTube-a3c1738eeaa3405d12c1c2f3102a24f3d15ebe3c.tar.gz
PeerTube-a3c1738eeaa3405d12c1c2f3102a24f3d15ebe3c.tar.zst
PeerTube-a3c1738eeaa3405d12c1c2f3102a24f3d15ebe3c.zip
[Server>Middlewares>Follows] Changing error code 400 to 500
Follows on http server is a server error not an error of the client.
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/follows.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts
index bdf39eb9c..040ee1f21 100644
--- a/server/middlewares/validators/follows.ts
+++ b/server/middlewares/validators/follows.ts
@@ -14,7 +14,7 @@ const followValidator = [
14 (req: express.Request, res: express.Response, next: express.NextFunction) => { 14 (req: express.Request, res: express.Response, next: express.NextFunction) => {
15 // Force https if the administrator wants to make friends 15 // Force https if the administrator wants to make friends
16 if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { 16 if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') {
17 return res.status(400) 17 return res.status(500)
18 .json({ 18 .json({
19 error: 'Cannot follow on a non HTTPS web server.' 19 error: 'Cannot follow on a non HTTPS web server.'
20 }) 20 })