SolidJS12mo ago

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

Am I supposed to throw new Error(), return an error Response, or...?
3 Replies
pilcrow12mo ago
Ah, looks like I'm supposed to throw ServerError Not sure why that didn't work before
Jasi12mo 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
Trader10112mo ago
also for createRouteAction ?
Want results from more Discord servers?
Add your server
More Posts
createResource / Suspense blocks renderingIm trying to understand how to handle async data fetching. Taking an example from the docs, with som`<script>` tag are loaded at the bottom of body, I need to load them on the `<head>` tag...Hello all 🙂 I need to use the Font Awesome kit which is available by inserting it into the `head` tSolid context doesnt workLearning solid using docs and i use the docs example to create a context but for some reason this erReactivity inside closure in return valueI have a function with a store, singals etc. This function returns an object, that object contains aError [RollupError]: "assign" is not exported by "node_modules/solid-js/web/dist/server.js"When trying to build my solid-start app using `solid-start build` I get the following error: ``` fisolid-router not updating when going the same page but with different parameterso/ so i have this in `/routines/[id].tsx`: ```tsx export default function EditRoutine() { const updating a member inside another member inside an array inside a store using an indexo/ so i have data structured as follows, which is inside a store: ```js { actions: [ { FileRoutes duplicate hydration and not displaying dynamic routeif i used fileroutes the nested route is not working well, but if i used not fileroutes it behave How to use SolidStart on existing SolidJs project in order to benefit of File Based Routing ?PS: I use SolidJs only for SPA, so only client-side ? Is it possible to use SolidStart only for clieHow do I modify a member of an object in an array in a SolidJS Store using the SetStoreFunction?(Re-post from https://stackoverflow.com/questions/76843586/how-do-i-modify-a-member-of-an-object-in-