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
{{ message }}
This repository was archived by the owner on Sep 2, 2025. It is now read-only.
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
Uh oh!
There was an error while loading. Please reload this page.
-
Can someone please help me understand why the error handler is used in some cases and not in others?
I have a table named
userwhich has a unique column namedemail.If I create a new
userwith a duplicate email the error fromfeathers-objectionlooks something like this:However, if I edit an existing
userto 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
_patchis 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 callerrorHandlerthere?Beta Was this translation helpful? Give feedback.
All reactions