In plain words
Handling errors means deciding in advance what your app does when something fails: tell the user what happened, record the details, and never fail silently.
Where you see it
Maya presses Save in Quill as her train enters a tunnel. Either the note quietly vanishes, or a message says "Couldn't save. Your note is still here." The second one is error handling.
What goes wrong
- Swallowing errors with an empty catch
The error disappears and so does your only clue, until a user reports a note that never saved.
try { await saveNote(note); } catch (e) {} - Showing raw errors to users
A stack trace or database message on screen confuses people and tells strangers about your tables. Show a plain message and log the details.
- Ignoring the error Supabase returns
Supabase doesn't throw when a query fails; it hands back { data, error }. Code that only reads data treats a failed save as success.
What to tell your agent
Quick check
Sign in to earn +10 XP for itQuill's Save button seems to work, but some notes are missing later and no errors appear anywhere. A likely cause?