You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can someone please help me understand why the error handler is used in some cases and not in others?
I have a table named user which has a unique column named email.
If I create a new user with a duplicate email the error from feathers-objection looks something like this:
This seems to happen when _patch is called and this query is hit. Making the change to add .catch(errorHandler); at the end of that statement seems to give the desired result but is there another reason why we don't call errorHandler there?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Can someone please help me understand why the error handler is used in some cases and not in others?
I have a table named
user
which has a unique column namedemail
.If I create a new
user
with a duplicate email the error fromfeathers-objection
looks something like this:However, if I edit an existing
user
to change the email to a value that already exists in the DB, I get an error that looks something like this:This seems to happen when
_patch
is called and this query is hit. Making the change to add.catch(errorHandler);
at the end of that statement seems to give the desired result but is there another reason why we don't callerrorHandler
there?Beta Was this translation helpful? Give feedback.
All reactions