Return { success: true, data } or { success: false, error } instead of throwing errors from server actions.
Why This Matters
Thrown errors from server actions surface as generic "something went wrong" in the UI. Structured results enable specific error messages.
Tags
nextjssupabaseserver-actions
Related Rules
Catch this automatically on every PR
BeforeMerge scans your pull requests against this rule and 3+ others. Get actionable feedback before code ships.