fix(submit): 分块上传的预算检查复用一分钟内读过的 blob 大小,存储读不到时回 503 让面板自动重试

This commit is contained in:
Lemon-miaow committed 2026-09-27 04:13:48 +08:00
1 parent 2f920cf1c9
commit d2730c6e5a
13 files changed
+335 -25

No files matched your search

+7
View File
@@ -660,6 +660,13 @@ describe("image whitelist and builds wire shapes", () => {
expect(humanizeError({ code: "submission_cooldown" })).toMatch(/try again/i);
});
it("says an uploads store that did not answer is worth another try", async () => {
const { humanizeError } = await import("./api");
expect(humanizeError({ status: 503, code: "uploads_store_unavailable" })).toBe(
"The uploads store did not answer — try again in a moment; what was already sent is kept.",
);
});
it("withdrawSubmission DELETEs /me/submissions/{id}", async () => {
const sub = { id: "sub-4", status: "pending_review" };
const fetchSpy = fakeFetch(sub);