diff options
author | Jorropo <admin@jorropo.ovh> | 2018-07-27 10:13:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-27 14:12:31 +0200 |
commit | a3c1738eeaa3405d12c1c2f3102a24f3d15ebe3c (patch) | |
tree | 41db9b8556356d2ff69a519ba260aeff2d0fdc72 /server/middlewares | |
parent | 646cfe74ee51fbbe1a94f6c69501c1577cfbba68 (diff) | |
download | PeerTube-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')
-rw-r--r-- | server/middlewares/validators/follows.ts | 2 |
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 | }) |