Intermediate
Survive a Full Disk
Three buttons try to save a model to a pretend cache with a 500-byte quota using saveToCache(kind, size). Write save(kind, size) so #status says: Saved for next time on success, Not enough space. Running without saving. for a QuotaExceededError, and Something went wrong for any other error.
The feature must keep working when saving fails, so never let the quota error escape.
What Check tests
- A small model is saved
- A big model hits the quota and the app carries on
- Any other error is reported differently
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.