Stop Rebuilding UI

Shadcn.io is not affiliated with official shadcn/ui

Promise Toast with Error

A Sonner promise toast that formats error messages using the rejected error details for specific failure feedback

Generic error failed messages tell users nothing—what actually went wrong? This React promise toast with error formatting shows specific error details. Built with Sonner and shadcn/ui, the error callback receives the error object—perfect for API failures, network errors, validation failures, permission denials, timeout errors, or any async operation where showing the actual error message (network timeout, invalid input, server error) helps users understand what happened instead of seeing generic failure notifications.

Promise Toast with Error preview

Scroll to load preview

Installation

FAQ

Was this page helpful?

Sign in to leave feedback.