Use utf8 in API error messages
I noticed this when Playwright was trying to draw cute ASCII art and it wasn't showing up right! Not a big deal, but it's a bit more correct to do this, so let's do it!
This commit is contained in:
parent
07d54b9a9e
commit
5470a49651
4 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ async function handle(req, res) {
|
||||||
itemValuesByIdOrName = await loadWakaValuesByIdOrName();
|
itemValuesByIdOrName = await loadWakaValuesByIdOrName();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
res.setHeader("Content-Type", "text/plain");
|
res.setHeader("Content-Type", "text/plain; charset=utf8");
|
||||||
res.status(500).send("Error loading Waka data from Google Sheets API");
|
res.status(500).send("Error loading Waka data from Google Sheets API");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,7 +173,7 @@ function isNeopetsUrl(urlString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function reject(res, message, status = 400) {
|
function reject(res, message, status = 400) {
|
||||||
res.setHeader("Content-Type", "text/plain");
|
res.setHeader("Content-Type", "text/plain; charset=utf8");
|
||||||
return res.status(status).send(message);
|
return res.status(status).send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,7 @@ async function loadUpdatedAtForSavedOutfit(outfitId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function reject(res, message, status = 400) {
|
function reject(res, message, status = 400) {
|
||||||
res.setHeader("Content-Type", "text/plain");
|
res.setHeader("Content-Type", "text/plain; charset=utf8");
|
||||||
return res.status(status).send(message);
|
return res.status(status).send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ async function loadIndexPageHtml() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function reject(res, message, status = 400) {
|
function reject(res, message, status = 400) {
|
||||||
res.setHeader("Content-Type", "text/plain");
|
res.setHeader("Content-Type", "text/plain; charset=utf8");
|
||||||
return res.status(status).send(message);
|
return res.status(status).send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue