If a function can fail, return a discriminated union (`{ ok: true; data: T } | { ok: false; error: E }`) instead of throwing — callers are forced to handle both cases.
0
Up
1
Down
-1
Net
No AI assessment yet for this rule.