getsentry / getsentry/sentry

Include team slug in 404 error when adding team to project

Open Beginner friendly
#116,812 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.