Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
POL SMOKE
Posts
Comments
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
Ok, i see clear now. The state of the previous resource must be checked before calling its getter. So the artists resource finally look like this:
const [artists] = createResource(() => song.state==="ready"?song()?.id:undefined, fetchSongArtists);
const [artists] = createResource(() => song.state==="ready"?song()?.id:undefined, fetchSongArtists);
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
thank you very mutch!!!
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
HOOO, and using a try catch in the getter seems to work perfectly.
https://playground.solidjs.com/anonymous/dc26daf8-d3a4-4f96-b4bf-d83a6704721c
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
hooooo, i seee. And it means the error is not accessible by song.error
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
So, fetchSong must not throws at all?
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
?
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
yeah, I don't know why the error is caught by the errorBoundary and not the ressource itself....
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
And isn't caught
39 replies
S
SolidJS
•
Created by POL SMOKE on 12/9/2024 in
#support
Error handling with chained resources.
If id become 0 , fetchSong throw
39 replies