Tool Error
A recoverable connection failure with a clear explanation and compact recovery actions.
Needs a fix
Workspace connection lost partway through
Your session expired. Reconnect to continue from where you left off.
Installation
Add the component source directly to your project.
pnpm dlx shadcn@latest add https://pastaui.com/r/tool-error.jsonAPI reference
Tool Error
| Prop | Type | Default | Description |
|---|---|---|---|
tool | string | — | Names the tool in the default error summary. |
title | string | — | Overrides the default connection failure summary. |
message | string | — | Explains what happened and what was preserved. |
onFix | () => void | — | Shows the primary recovery action and handles its selection. |
fixLabel | string | Fix connection | Labels the primary recovery action. |
onRetry | () => void | — | Shows Retry and handles retrying the failed tool call. |
code | string | — | Optional diagnostic error code. |
attempts | number | — | Optional attempt count. |