X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fvalidators%2Ffollows.ts;h=bdf39eb9c543389b58139d87e8e5339e822b6c54;hb=2baea0c77cc765f7cbca9c9a2f4272268892a35c;hp=7dadf6a19e49a0c4e716833f55cfcdbb67408ab3;hpb=da854ddd502cd70685ef779c673b9e63757b8aa0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/validators/follows.ts b/server/middlewares/validators/follows.ts index 7dadf6a19..bdf39eb9c 100644 --- a/server/middlewares/validators/follows.ts +++ b/server/middlewares/validators/follows.ts @@ -16,7 +16,7 @@ const followValidator = [ if (isTestInstance() === false && CONFIG.WEBSERVER.SCHEME === 'http') { return res.status(400) .json({ - error: 'Cannot follow non HTTPS web server.' + error: 'Cannot follow on a non HTTPS web server.' }) .end() } @@ -41,7 +41,11 @@ const removeFollowingValidator = [ const follow = await ActorFollowModel.loadByActorAndTargetHost(serverActor.id, req.params.host) if (!follow) { - return res.status(404) + return res + .status(404) + .json({ + error: `Follower ${req.params.host} not found.` + }) .end() }