Stack Trace

A line for a tool call that failed. The error is the title, like "Failed: TypeError"; open it for the stack frames, which can link to the file and line.

Usage

Stack Trace

Reset the database and seed it.

TypeError: Cannot read properties of undefined (reading 'email')

seedUsers in prisma/seed.ts:27main in prisma/seed.ts:51

The migrations ran, but the seed failed in seedUsers. One fixture has no profile, so profile.email is undefined.

import {  Component,  DestroyRef,  ViewEncapsulation,  inject,  signal,} from '@angular/core';import {  ScBubble,  ScBubbleContent,

A Trace line with an error status, collapsible on the frames. Your own frames are links to the file at the line; the framework's fold into a line of their own, so the frames you can fix come first.

Anatomy

import {  ScTrace, ScTraceLine, ScTraceIcon, ScTraceTitle,  ScTraceCollapsible, ScTraceCollapsibleTrigger, ScTraceCollapsiblePanelContent,  ScCollapsible, ScCollapsibleTrigger, ScCollapsiblePanel,} from '@semantic-components/ui';
<div scTrace>  <div scCollapsible scTraceCollapsible [open]="true">    <button scCollapsibleTrigger scTraceCollapsibleTrigger>      <span scTraceLine status="error">        <span scTraceIcon><svg siTerminalIcon></svg></span>        <span scTraceTitle>Failed: {{ error }}</span>      </span>    </button>    <div scCollapsiblePanel>      <div scTraceCollapsiblePanelContent class="flex flex-col gap-2">        <p class="text-destructive font-mono text-xs">{{ error }}</p>        <div scTrace>          <a [href]="frameLink">            <span scTraceLine>… in prisma/seed.ts:27</span>          </a>        </div>      </div>    </div>  </div></div>

The title truncates, so the content repeats the whole error at its top.

Sending the stack

A failed tool sends only its error message by default; the server has to send the stack for the frames. A stack shows file paths from your server: send it in development only.

Examples

Every frame in one block: the framework's stay muted, so your own stand out.

Muted frames

TypeError: Cannot read properties of undefined (reading 'total')

  1. at formatInvoice (app/lib/billing.ts:42:31)
  2. at InvoiceRow (app/components/invoice-row.tsx:18:12)
  3. at renderWithHooks (node_modules/react-dom/cjs/react-dom.development.js:14985:18)
  4. at beginWork (node_modules/react-dom/cjs/react-dom.development.js:19049:16)
import { Component, ViewEncapsulation } from '@angular/core';import {  ScCollapsible,  ScCollapsiblePanel,  ScCollapsibleTrigger,  ScTrace,  ScTraceCollapsible,  ScTraceCollapsiblePanelContent,  ScTraceCollapsibleTrigger,  ScTraceIcon,

RTL

TypeError: Cannot read properties of undefined (reading 'email')

import { Dir } from '@angular/cdk/bidi';import { Component, LOCALE_ID, ViewEncapsulation } from '@angular/core';import { RouterLink } from '@angular/router';import {  ScCollapsible,  ScCollapsiblePanel,  ScCollapsibleTrigger,  ScTrace,  ScTraceCollapsible,  ScTraceCollapsiblePanelContent,

API reference

See the Trace.