fix(tickets): fix permissions toast, board fallback, assignment search, remove load more
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
All checks were successful
Mirror to GitHub / mirror (push) Successful in 2s
- list_resources: return [] on PSAError instead of 502 — stops global interceptor toast when CW API key lacks ticket members permission (Lesson 111) - list_boards/list_priorities: add warning logging so Railway logs reveal the root cause when CW permissions are missing - TicketsPage: derive board options from ticket search results when listBoards returns empty (CW permissions fallback) - TicketFilterBar: replace assignment <select> with searchable member picker — fixed options (All/Mine/Unassigned) + text-filtered member dropdown - TicketQueue: remove Load More / infinite scroll; page now exists at /tickets Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -376,8 +376,9 @@ async def list_boards(
|
||||
provider = await get_provider_for_account(current_user.account_id, db)
|
||||
boards = await provider.list_boards()
|
||||
return [PSABoardResponse(id=b.id, name=b.name) for b in boards]
|
||||
except PSAError:
|
||||
except PSAError as e:
|
||||
# Boards are optional UI chrome — degrade gracefully rather than surfacing a toast
|
||||
logger.warning("list_boards failed: %s", e)
|
||||
return []
|
||||
|
||||
|
||||
@@ -630,7 +631,9 @@ async def list_ticket_resources(
|
||||
try:
|
||||
return await ticket_svc.list_resources(current_user.account_id, ticket_id, db)
|
||||
except PSAError as e:
|
||||
raise HTTPException(status_code=502, detail=str(e))
|
||||
# Resources are optional display data — degrade gracefully rather than surfacing a toast
|
||||
logger.warning("list_resources(%s) failed: %s", ticket_id, e)
|
||||
return []
|
||||
|
||||
|
||||
@router.post("/tickets/{ticket_id}/resources", response_model=PSAResourceSchema, status_code=201)
|
||||
@@ -679,7 +682,8 @@ async def list_priorities(
|
||||
provider = await get_provider_for_account(current_user.account_id, db)
|
||||
raw = await provider.list_priorities()
|
||||
return [PSAPrioritySchema(id=p["id"], name=p["name"]) for p in raw if p.get("id")]
|
||||
except PSAError:
|
||||
except PSAError as e:
|
||||
logger.warning("list_priorities failed: %s", e)
|
||||
return []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user