File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
packages/grill/src/providers Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,27 @@ export const GrillProvider: FC<GrillProviderProps> = ({
207207 toastIds . current . delete ( txId ) ;
208208 break ;
209209 }
210+ case "error-simulation-failed" : {
211+ console . error ( "Simulation failed" , event ) ;
212+ const description = `Simulation failed: ${ event . errorMessage } ` ;
213+ if ( existingToastId ) {
214+ // Update existing toast to error
215+ toast . error ( event . title , {
216+ id : existingToastId ,
217+ description,
218+ duration : errorToastDuration ,
219+ } ) ;
220+ } else {
221+ // Create new error toast if somehow we don't have one
222+ toast . error ( event . title , {
223+ description,
224+ duration : errorToastDuration ,
225+ } ) ;
226+ }
227+ // Clean up toast ID after error
228+ toastIds . current . delete ( txId ) ;
229+ break ;
230+ }
210231 }
211232 } ,
212233 [
You can’t perform that action at this time.
0 commit comments