Skip to content

fix(api): invalid state transitions surface as 409, not an opaque 500 - #666

Open
yggdrasilworld wants to merge 1 commit into
MergeFi:mainfrom
yggdrasilworld:fix/transition-409-579
Open

yggdrasilworld wants to merge 1 commit into
MergeFi:mainfrom
yggdrasilworld:fix/transition-409-579

Conversation

@yggdrasilworld

Copy link
Copy Markdown

What

InvalidBountyTransitionError/InvalidMilestoneTransitionError extended plain Error — the global filter sent them down the internal-error path as a generic 500. A claim of an already-claimed bounty is a client-facing state-conflict.

Fix

Both now extend HttpException(409 CONFLICT) — the real status. (Pairs with frontend#762 — the claim-race detection matches the 409.)

Resolves #579

InvalidBountyTransitionError + InvalidMilestoneTransitionError extended
plain Error — the global filter sent them down the internal-error path as
a generic 500. A claim of an already-claimed bounty (or any bad transition)
is a client-facing state-conflict — now extends HttpException(409).

Resolves MergeFi#579
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@yggdrasilworld is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid bounty/milestone state transitions surface as 500 'unexpected error' instead of a 4xx

1 participant