Skip to content

fix: returns 409 with appropriate error messages on duplicate post requests#107

Merged
semmet95 merged 5 commits into
mainfrom
fix/post-same-error
May 6, 2026
Merged

fix: returns 409 with appropriate error messages on duplicate post requests#107
semmet95 merged 5 commits into
mainfrom
fix/post-same-error

Conversation

@semmet95
Copy link
Copy Markdown
Contributor

@semmet95 semmet95 commented May 6, 2026

Fixes: #106


  • Behavior: Map DB duplicate-key errors to domain errors and return HTTP 409 for duplicate Source/Claim/Proof POSTs.
  • Handlers: Return 409 on duplicate errors.
  • Services: Translate GORM duplicate errors into domain errors.
  • Errors: Adds domain error constants
  • Misc: Small startup/config tweaks

semmet95 added 5 commits May 6, 2026 18:54
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
@semmet95 semmet95 marked this pull request as ready for review May 6, 2026 15:39
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@semmet95
Copy link
Copy Markdown
Contributor Author

semmet95 commented May 6, 2026

@cubic-dev-ai

@cubic-dev-ai
Copy link
Copy Markdown

cubic-dev-ai Bot commented May 6, 2026

@cubic-dev-ai

@semmet95 I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 21 files

@semmet95 semmet95 merged commit a2ff074 into main May 6, 2026
5 checks passed
@semmet95 semmet95 deleted the fix/post-same-error branch May 6, 2026 16:08
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.

POST should return 409 if the record already exists

1 participant