fix(jira): always return HTTP 200 from jira-test + strip trailing slash
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
Some checks failed
Aegis CI / lint-and-test (push) Has been cancelled
- jira-test now returns {status: "ok"|"error", message: ...} with
HTTP 200 so Cloudflare never intercepts the response
- jira_service strips trailing slash from URL before creating Jira
client (avoids double-slash in REST paths)
- Frontend reads data.status field instead of HTTP status code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -142,8 +142,12 @@ def get_user_jira_client(user: User, db: Session):
|
||||
|
||||
from atlassian import Jira
|
||||
|
||||
# Strip trailing slash — the Atlassian library appends paths like
|
||||
# /rest/api/2/myself and a trailing slash causes double-slash URLs.
|
||||
clean_url = jira_url.rstrip("/")
|
||||
|
||||
return Jira(
|
||||
url=jira_url,
|
||||
url=clean_url,
|
||||
username=auth_email,
|
||||
password=user.jira_api_token,
|
||||
cloud=True,
|
||||
|
||||
Reference in New Issue
Block a user