fix: show the reason the server gave for a failed action
Every failure in the management screens printed a guess. Deleting a working copy said "it may be published, or something may reference it, or someone may have edited it first" — three maybes, while the server had answered with exactly one: "이 기록을 참조하는 곳이 있어 삭제할 수 없습니다". A version conflict read as "in use" because the same sentence covered both, and an author watching some deletions succeed and others fail had no way to tell them apart. The gateway now carries the server's client-safe message and the screens show it. The canned sentences remain only as a fallback for a failure that never reached the server. The topic status label said "사용 중" for every active topic, including one created seconds earlier that nothing references. Next to a refusal about records that use a topic, the two read as the same statement. It says "활성" now, which is what the status means. Publishing also stops demanding a finished document — the mock validator moves with the real one, so what an author sees against fixtures matches production.
This commit is contained in:
@@ -397,7 +397,10 @@ test("validation issue order, evidence, preview freshness and warning-set public
|
||||
{ expectedVersion: 2 },
|
||||
{ idempotencyKey: "invalid" },
|
||||
);
|
||||
assert.equal(invalid.status, "INVALID");
|
||||
// 비어 있음은 더 이상 게시를 막지 않는다 — 무엇을 얼마나 쓸지는 작성자가 정한다. 그래서 이
|
||||
// 문서는 INVALID 가 아니라 WARNINGS 다. 항목이 사라지는 것이 아니라 심각도만 내려간다는 것이
|
||||
// 여기서 확인해야 할 점이고, 그래서 코드 목록은 그대로 둔다.
|
||||
assert.equal(invalid.status, "WARNINGS");
|
||||
assert.deepEqual(
|
||||
invalid.issues.map(({ code }) => code),
|
||||
["QUESTION_FACT_REQUIRED", "QUESTION_OPTIONS_FEWER_THAN_TWO"],
|
||||
|
||||
Reference in New Issue
Block a user