handleServerError no longer works with returnValidationErrors #392
markedwards
started this conversation in
General
Replies: 1 comment 1 reply
-
|
ping on this -- this blocks us from upgrading, and really looks like a kind of nasty bug |
Beta Was this translation helpful? Give feedback.
1 reply
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.
-
Upgrading from next-safe-action 8.0.1 -> 8.0.11 breaks our integration. We have a use-case where we throw a particular type of DB-related validation error and we want to catch it and call
returnValidationErrorsin a particular pattern.To do this, we pass a
handleServerError()function, check if the error is an instance of our special type, and if so callreturnValidationErrors()so the client gets a useful error pattern.This worked in 8.0.1, but in 8.0.11
handleServerError()started triggering on theActionServerValidationErrorthrown byreturnValidationErrors(), so its broken.Should I file a bug here? Should we be going about this differently?
Beta Was this translation helpful? Give feedback.
All reactions