Skip to content

fix: surface ticket creation failures to the client - #1

Open
bensofficial wants to merge 1 commit into
mainfrom
fix/surface-ticket-creation-failure
Open

fix: surface ticket creation failures to the client#1
bensofficial wants to merge 1 commit into
mainfrom
fix/surface-ticket-creation-failure

Conversation

@bensofficial

Copy link
Copy Markdown
Member

Summary

  • Ticket creation errors were caught and swallowed on the server, so the client received 201 Created and rendered "submitted successfully" even when the ticket system had failed.
  • The DB row now stays uncommitted (db.flush() instead of db.commit()) until the ticket succeeds. On a raised exception or a missing key from an enabled ticket system, a new shared helper (api/routes/_ticket.py) rolls back the pending INSERT and raises HTTPException(502) so the client's existing handleSubmissionFailure flow shows the red error toast.
  • Applied to all 5 request routes: support, VM, VM access, Artemis developer, TUM guest. NoOp is still tolerated (returns None and ticket_system_enabled is false).

Test plan

  • Run uv run ruff check . and uv run ty check . in server/ — I couldn't run these locally (uv not installed).
  • Run the Playwright e2e suite — debug ticket system always returns a key, so behavior should be unchanged for happy paths.
  • Manually verify: point at a broken Jira/Redmine (or temporarily raise inside handle_support_ticket_creation) and submit a support request. Expect the red "Submission failed" toast, not the green success card.
  • Manually verify happy path across each form still works end-to-end (request submitted, ticket created, ticket URL rendered on success card).

🤖 Generated with Claude Code

Ticket creation errors were caught and swallowed on the server, so the
client received 201 Created and rendered "submitted successfully" even
when no ticket was produced. The DB now stays uncommitted until the
ticket succeeds, so a failed ticket rolls back the request row and
returns 502, letting the existing client error UI kick in.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bensofficial bensofficial self-assigned this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant