S
SolidJS15mo 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
pilcrow15mo ago
Ah, looks like I'm supposed to throw ServerError Not sure why that didn't work before
Jasmin
Jasmin15mo 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
Trader10115mo ago
also for createRouteAction ?
Want results from more Discord servers?
Add your server