#159 — BUG: another 500 while patching dashboard

Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned

Created: 2024-10-23 · Updated: 2025-09-15

Description

Reported by Chidi

STR: https://github.com/user-attachments/assets/f0a626fb-29ff-4802-ac94-ac17ba307427

Expected: 200 code and dashboard patched

Actual: 500 code

Found in logs

2024-10-23T14:25:17.910216228Z   File "/app/app/api/dashboards_router.py", line 451, in patch_dashboard
2024-10-23T14:25:17.910221378Z     widgets_dicts = await update_dashboard_widgets(
2024-10-23T14:25:17.910226848Z                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-10-23T14:25:17.910232318Z   File "/app/app/api/dashboard_helpers.py", line 169, in update_dashboard_widgets
2024-10-23T14:25:17.910237648Z     to_remove.remove(item.clone_widget_id)
2024-10-23T14:25:17.910242798Z ValueError: list.remove(x): x not in list

Implementation details:

Issue was caused by duplicated widget in request body (see “clone_widget_id: 183” in video). Fixed with ignoring such duplicates.

Also fixed:

  • Absence of “not touched” widgets in PATCH dashboards response
  • |-no-tenant| HTTP logs from TimingLoggingMiddleware due to absence of user.request in auth.py.

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets