Skip to content
Latchkey

Jira REST "404 ... issue does not exist" (wrong key) in CI

Jira returns 404 with "Issue does not exist" when the key in the URL does not match a visible issue. The key may have the wrong project prefix, the wrong number, or point at a project the account cannot access.

What this error means

A call to /rest/api/3/issue/ABC-123 fails with 404 and "Issue does not exist or you do not have permission to see it." The rest of the API works.

Jira REST
HTTP/1.1 404 Not Found
{"errorMessages":["Issue does not exist or you do not have permission to see it."],"errors":{}}

Common causes

The issue key is wrong or built from bad input

A key parsed from a branch or commit is malformed, uses the wrong project prefix, or references a number that does not exist.

The account cannot see the project

Jira returns 404 (not 403) to hide existence, so a browse-permission gap looks identical to a missing issue.

How to fix it

Validate the key before using it

  1. Log the exact key the pipeline extracted and confirm the project prefix.
  2. Fetch the issue directly to distinguish a typo from a permission gap.
  3. Grant the account Browse Projects permission if the issue truly exists.
Terminal
KEY=ABC-123
curl -sf -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
  "https://your-domain.atlassian.net/rest/api/3/issue/$KEY?fields=key"

Normalize keys extracted from Git

Uppercase the project prefix and strip stray characters so a branch like feature/abc-123-x yields a valid ABC-123.

Terminal
KEY=$(echo "$BRANCH" | grep -oiE '[a-z]+-[0-9]+' | head -1 | tr '[:lower:]' '[:upper:]')

How to prevent it

  • Extract and validate the issue key early, and fail fast if empty.
  • Uppercase project prefixes so key matching is case-consistent.
  • Grant the CI account Browse Projects so 404-as-permission is ruled out.

Frequently asked questions

What causes "Jira "Issue does not exist""?
A key parsed from a branch or commit is malformed, uses the wrong project prefix, or references a number that does not exist.
How do I fix Jira "Issue does not exist"?
Validate the key before using it

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card