JavaScript·Intermediate·Conceptual·1 min read
Where should errors be caught?
Short interview answer
Catch at a boundary that can add context, recover, translate the error into domain behavior, or present it. Catching only to log and silently continue often corrupts control flow; rethrow when the current layer cannot resolve the failure.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.