Replies: 1 comment
-
Why don't you just return the data? Just give the client the data it needs. For success/failure case, just give the appropriate tagged result. class instances from server simply get serialized as PJO. If you want it to be hydrated into a class, you need to write the logic on the client. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With the new singleFetch, is there any way to serialize and properly send a custom error class?
For example, I have this class:
Now, regarding the tidbit that any custom error class will work as long as it has a globally accessible constructor client side, I added this to my entry.client.tsx:
And I'm getting a ValidationError type in the browser! However, fieldErrors is unpopulated. Is there a way to populate the custom fields?
Beta Was this translation helpful? Give feedback.
All reactions