Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return 409 error when creating a project with a conflicting slug #471

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

leafty
Copy link
Member

@leafty leafty commented Oct 18, 2024

Fixes #308.

}
_, response = await sanic_client.post("/api/data/projects", headers=user_headers, json=payload)

assert response.status_code == 409, response.text
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: prior to the fix, a HTTP 500 error would be returned, with leakage from postgres, see #308.

@leafty leafty marked this pull request as ready for review October 18, 2024 11:24
@leafty leafty requested a review from a team as a code owner October 18, 2024 11:24
@coveralls
Copy link

coveralls commented Oct 18, 2024

Pull Request Test Coverage Report for Build 11462035394

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 90.801%

Totals Coverage Status
Change from base Build 11461345869: 0.05%
Covered Lines: 10818
Relevant Lines: 11914

💛 - Coveralls

olevski
olevski previously approved these changes Oct 21, 2024
@leafty leafty merged commit 7965ed2 into main Oct 23, 2024
15 checks passed
@leafty leafty deleted the leafty/fix-451-project-conflict branch October 23, 2024 07:14
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.

Send a 4xx conflict error when resources use an existing slug
4 participants