[Server>Middlewares>Follows] Changing error code 400 to 500

Follows on http server is a server error not an error of the client.
pull/876/head
Jorropo 2018-07-27 10:13:19 +02:00 committed by Chocobozzz
parent 646cfe74ee
commit a3c1738eea
1 changed files with 1 additions and 1 deletions

View File

@ -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.'
})