Our 53 Server Actions never throw at the UI, and one call to unstable_rethrow is why

typescript dev.to

Nakodo has 53 exported Server Actions across eight actions.ts files. Every one of them returns the same shape, nothing in the UI uses a try/catch, and the error boundary is only ever reached by a bug. That sounds like it needs a framework. It is 60 lines. The type is the policy // What Server Actions return, so every caller decides success the same way: // `r.ok`. Expected failures come back as values; only bugs reach the error // boundary. export type ActionOkT extends object =

Read Full Tutorial open_in_new
arrow_back Back to Tutorials