fix: reject idempotency key payload conflicts

This commit is contained in:
ik
2026-09-11 07:44:07 +07:00
parent 42bdec6c2f
commit 5b2db1cf48
4 changed files with 11 additions and 1 deletions
+3
View File
@@ -441,3 +441,6 @@ def test_catch_report_idempotency_key_prevents_duplicates(monkeypatch) -> None:
assert second.json()["idempotent"] is True
assert second.json()["id"] == report_id
assert second.json()["screenshot_upload_token"] == first.json()["screenshot_upload_token"]
changed = dict(payload, weight_g=7800)
conflict = client.post("/api/v1/catch-reports", json=changed, headers=headers)
assert conflict.status_code == 409