New: LICENSEファイル / Del: package.json.license / Feat: setup/initializationでVAPIDを生成 / Fix: 全てのエンドポイントでsuccessをレスポンス / Chg: input_noneエラーを廃止。入力がない場合は{}として解決する / Feat: フロントエンドでserver-infoを読み込む

This commit is contained in:
2026-03-22 20:48:28 +09:00
parent 841553a1ef
commit 60a87d4709
21 changed files with 828 additions and 54 deletions
+1 -14
View File
@@ -32,14 +32,6 @@ try {
fastify.setErrorHandler((err, req, res) => {
res.header("Content-Type", "application/json");
if (err instanceof SyntaxError && /JSON/.test(err.message)) {
return res.status(400).send(ErrorBase({
bad: "client",
code: "input_none",
message: "入力がありません。",
}));
}
const customLogger = new Logger("Unknown(Error handler)");
customLogger.error("Unknown error:", err);
@@ -127,12 +119,7 @@ try {
done(null, json);
} catch (err) {
if (err instanceof Error) {
(err as any).statusCode = 400;
done(err, undefined);
} else {
done(new Error("Invalid JSON"), undefined);
}
done(null, {});
}
});