S
SolidJS14mo ago
pilcrow

How to throw errors in `createRouteAction()` and `createServerAction$()`?

Am I supposed to throw new Error(), return an error Response, or...?
3 Replies
pilcrow
pilcrow14mo ago
Ah, looks like I'm supposed to throw ServerError Not sure why that didn't work before
Jasi
Jasi14mo ago
Everything you throw inside these functions will be accessible in the .error property :) https://start.solidjs.com/api/createRouteAction#handle-errors
SolidStart Beta Docuentation
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
Trader101
Trader10114mo ago
also for createRouteAction ?
Want results from more Discord servers?
Add your server