파일을 업로드하는 도중에 HTTP 연결이 끊기면 서버가 크래시되던 버그 수정

This commit is contained in:
static
2025-01-15 06:09:27 +09:00
parent ed4da7b1df
commit 9f9c52ff94
3 changed files with 68 additions and 73 deletions

View File

@@ -115,10 +115,8 @@ export const uploadFile = async (
} catch (e) {
await safeUnlink(path);
if (e instanceof IntegrityError) {
if (e.message === "Inactive MEK version") {
error(400, "Invalid MEK version");
}
if (e instanceof IntegrityError && e.message === "Inactive MEK version") {
error(400, "Invalid MEK version");
}
throw e;
}