Search⌘ K
AI Features

Designing for a Failed Response

Understand how to design AI-powered frontend features that handle failed responses gracefully. Learn to create clear visual distinctions between success and failure states, use alert roles for accessibility, and provide retry options in the same UI location to enhance user recovery from errors.

What a failure looked like before

The summary component built in Module 4 already had a catch block, but all it did was set an error string that displayed exactly like a real summary, in the same italic block, with no visual difference and no way to do anything about it. A person seeing that block had no way to tell, at a glance, whether they were looking at a genuine summary or a message saying something had gone wrong. And even once they realized it had failed, the only option was to remember ...