From: Jorropo Date: Fri, 27 Jul 2018 08:13:19 +0000 (+0200) Subject: [Server>Middlewares>Follows] Changing error code 400 to 500 X-Git-Tag: v1.0.0-beta.10.pre.3~24 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a3c1738eeaa3405d12c1c2f3102a24f3d15ebe3c;p=oweals%2Fpeertube.git [Server>Middlewares>Follows] Changing error code 400 to 500 Follows on http server is a server error not an error of the client. --- 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 = [ (req: express.Request, res: express.Response, next: express.NextFunction) => { // Force https if the administrator wants to make friends if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { - return res.status(400) + return res.status(500) .json({ error: 'Cannot follow on a non HTTPS web server.' })