Sonarly Claude Code 6ce23a4115 fix(twenty-front): return null instead of throwing in SeeVersionWorkflowRunSingleRecordCommand
https://sonarly.com/issue/26767?type=bug

The "See Version" command menu button on the workflowRuns index page throws an unhandled error when the selected record's `workflowVersion` relation data isn't loaded in the record store, causing a snackbar error and Sentry noise.

Fix: Two changes were made:

1. ROOT CAUSE FIX (SeeVersionWorkflowRunSingleRecordCommand.tsx):
   Changed `throw new Error('Selected record is required to see version workflow run')` to `return null`.

   Why: On the /objects/workflowRuns index page, record index queries use shallow depth and don't load nested relation objects like `workflowVersion: { id: ... }`. When a user selects a workflowRun row, this pinned command mounts immediately via CommandRunner and tries to access `selectedRecord.workflowVersion.id`, which is undefined. The throw crashes the component, triggers the error boundary, shows an error snackbar, and fires a Sentry event.

   Returning null instead is the correct pattern — the sibling SeeWorkflowWorkflowRunSingleRecordCommand handles the same scenario with `return null`. The error boundary renders a null fallback anyway, so the throw provides no benefit over returning null directly. The command simply becomes a no-op when relation data isn't available.

2. MONITORING IMPROVEMENT (CommandMenuItemErrorBoundary.tsx):
   Enhanced the Sentry capture to:
   - Add `commandMenuItemId` tag for easier filtering/debugging
   - Set severity level to `warning` instead of default `error` — command menu errors are recoverable (the boundary renders null), not fatal
   - Add fingerprint `['command-menu-item-error', error.message]` so Sentry groups events by message rather than creating duplicate issues per stack trace variation

   This reduces Sentry noise from expected edge cases that reach the error boundary.
2026-04-15 19:49:42 +00:00
2026-04-11 10:00:24 +00:00
2025-08-07 17:02:12 +02:00

Twenty logo

The #1 Open-Source CRM

🌐 Website · 📚 Documentation · Roadmap · Discord · Figma


Cover


Installation

See: 🚀 Self-hosting 🖥️ Local Setup

Why Twenty

We built Twenty for three reasons:

CRMs are too expensive, and users are trapped. Companies use locked-in customer data to hike prices. It shouldn't be that way.

A fresh start is required to build a better experience. We can learn from past mistakes and craft a cohesive experience inspired by new UX patterns from tools like Notion, Airtable or Linear.

We believe in open-source and community. Hundreds of developers are already building Twenty together. Once we have plugin capabilities, a whole ecosystem will grow around it.


What You Can Do With Twenty

Please feel free to flag any specific needs you have by creating an issue.

Below are a few features we have implemented to date:

Personalize layouts with filters, sort, group by, kanban and table views

Companies Kanban Views

Customize your objects and fields

Setting Custom Objects

Create and manage permissions with custom roles

Permissions

Automate workflow with triggers and actions

Workflows

Emails, calendar events, files, and more

Other Features


Stack

Thanks

Chromatic Greptile Sentry Crowdin E2B

Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).

Join the Community

Description
No description provided
Readme AGPL-3.0 1.5 GiB
Languages
TypeScript 78.4%
MDX 17.8%
JavaScript 3.3%
Python 0.3%