From 2a4fa2861f1652758ab3ff59d1e47f7f680f1f41 Mon Sep 17 00:00:00 2001 From: Alec Date: Fri, 7 Feb 2025 13:53:30 -0500 Subject: [PATCH] set content type for join errors (#207) --- server/api/GamesAPI.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/api/GamesAPI.js b/server/api/GamesAPI.js index 7744751..2c043ed 100644 --- a/server/api/GamesAPI.js +++ b/server/api/GamesAPI.js @@ -83,9 +83,11 @@ router.patch('/:code/players', async function (req, res) { res.status(200).send({ cookie: data, environment: gameManager.environment }); }).catch((data) => { console.error(data); + res.set('content-type', 'text/plain'); res.status(data.status || 500).send(data.reason); }); } else { + res.set('content-type', 'text/plain'); res.status(404).send(); } }