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:
@@ -1046,8 +1046,14 @@ function JiraConfigSection() {
|
||||
const testMut = useMutation({
|
||||
mutationFn: testJiraConnection,
|
||||
onSuccess: (data) => {
|
||||
setTestResult({ connectedAs: data.connected_as, url: data.jira_url });
|
||||
setTestError(null);
|
||||
// Backend always returns HTTP 200; status field tells us if it worked
|
||||
if (data.status === "ok") {
|
||||
setTestResult({ connectedAs: data.connected_as ?? "", url: data.jira_url ?? "" });
|
||||
setTestError(null);
|
||||
} else {
|
||||
setTestError((data as { message?: string }).message ?? "Connection failed");
|
||||
setTestResult(null);
|
||||
}
|
||||
},
|
||||
onError: (err: Error) => {
|
||||
setTestError(err.message || "Connection failed");
|
||||
|
||||
Reference in New Issue
Block a user