Include team slug in 404 error when adding team to project
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 21h 23m
- Merged PRs (30d)
- 607
Description
When adding a non-existent team to a project via the API, the response is:
{"detail": "Team does not exist."}
The error omits which team slug triggered the failure. This is particularly painful for API consumers making bulk calls (e.g. via Terraform) that attempt to add multiple teams to a project in sequence — when one fails, there is no way to identify the offending team from the error response alone without cross-referencing request logs.
Suggested improvement: include the team slug in the detail message, e.g.:
{"detail": "Team 'backend-eng' does not exist."}
Action taken on behalf of Karan Pujji.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the API entry point that adds a team to a project and trace the path producing the “Team does not exist.” 404 response. Update the response so it includes the requested team slug, then verify that missing-team requests return the proposed detail message without changing successful additions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100