Svelte · Senior · Question 29 of 75
What does handleError do, and why shouldn't it expose details?
- ✓Correct answer: It receives unexpected errors so you can log them and return a safe error shape for the user; stack traces may leak secrets
- 2It handles 404s only
- 3It retries failed requests
Explanation
Expected errors created with error() carry user-facing messages; unexpected ones should show a generic message.