throw
a validationError
#321
moishinetzer
started this conversation in
Ideas
Replies: 1 comment
-
I spent quite a bit of time in the beginning of this library trying to figure out how to achieve that. I'm right there with you haha. Unfortunately, I don't think it's possible without some kind of userland wrapper around your action. |
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
-
It would be great, if instead of returning a deeply nested validation error, we would be able to
throw
thevalidationError
just like you canthrow
a remixredirect
. This would help with deeply nested service functions having to return the error, and having to return that from theloader
, essentially making extracting out the logic an anti-pattern.Are there any other patterns that others use to tackle this issue, or perhaps is there a "wrapper" or abstraction that can be applied to make this functionality work?
Beta Was this translation helpful? Give feedback.
All reactions