-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error handling is not working correctly for Postgres #130
Comments
When I log the incoming error in
|
Is there a reason that the error handler doesn't look more like the objection recipe here: https://vincit.github.io/objection.js/recipes/error-handling.html#examples ? |
You can always access the original error instance via a Symbol. check here for more info. |
@robbyphillips I'm wondering the same thing. It looks like the error handler is trying to handle Objection errors according to this comment. However, that block is never executing because |
Issue
My user model requires emails to be unique. If I try to create a user with a duplicate email address I get a 500 error with the DB error as the message.
Debugging
I've been trying to debug in
error-handler.js
. It looks like this error just isn't being handled. The incoming error object has all the necessary info to return a well formed Feathers error, but it's not doing anything.Code
I have a very simple user service that looks like this:
users.service.ts
users.class.ts
base.class
is very simple and is simply extendingfeathers-objection.Service
with some extra typing.Dependencies
The text was updated successfully, but these errors were encountered: