#486 — [Bug]: unstable errors about merchant submission violates constraint for fee configs
Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned
Created: 2025-08-12 · Updated: 2025-09-15
Description
Steps to reproduce
- In staging open OpenAPI UI and login under partner user
- Try to submit merchant multiple times with not all fields ready on PE side.
Expected behavior
200 response with PE errors.
Actual behavior
500 with: Error: duplicate key value violates unique constraint "fee_config_name_key" DETAIL: Key (name)=(a12e63ed-59a2-45f8-9705-e808f3428678) already exists.
Investigation details
By logs and db content everything was right until the error.
Second repro was 500 but with different: Error: insert or update on table "merchant" violates foreign key constraint "merchant_fee_config_id_fkey" DETAIL: Key (fee_config_id)=(99) is not present in table "fee_config".
Bad thing is that there is a chance that once error started it is keeping reproducing after - first error was “one time” but the second stays until it is fixed in database.
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets