Sonarly Claude Code dc6c6c16c9 fix: gracefully handle missing identifier chip generator for custom objects
https://sonarly.com/issue/22439?type=bug

When a custom object (e.g., "deliverable") is referenced via a relation field, the UI crashes with an unhandled throw if no identifier chip generator exists for that object. The user sees the error on `/objects/projects` page when the table tries to render relation chips.

Fix: Restored the graceful fallback in `useRecordChipData` when an identifier chip generator is missing for an object.

The commit 98e199c01d ("Support Full Name as Record Text Identifier") replaced the previous graceful fallback with a hard `throw new Error(...)`. This causes a React crash whenever a custom object's chip generator is missing from the pre-computed map — which can happen when:
- A custom object's label identifier field is misconfigured
- Metadata store has objects loaded before their fields (localStorage race condition)
- A custom object's label identifier field was deleted

The fix restores the original pattern: when a chip generator is not found for an object, fall back to `generateDefaultRecordChipData()` which produces a reasonable chip using the record's `name` field. This utility already exists and is used by `useRelationFromManyFieldDisplay` and `useRelationToOneFieldDisplay` for the same purpose.

This matches the team's established pattern (see commit 6e7d2db58f by Charles Bochet: "Fix From Many relation for deleted notes crashing") where the approach is to gracefully degrade rather than crash when metadata is incomplete.
2026-04-07 13:29:14 +00:00
2026-04-07 11:44:23 +00: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

Languages
TypeScript 78%
MDX 18.5%
JavaScript 3.1%
Python 0.2%