-
Notifications
You must be signed in to change notification settings - Fork 117
404 response from populateUser() hook #258
Comments
Right now it's not that easy. The only thing you can do is register your own error middleware to try and detect where the request went to, what they were requesting and if it is actually missing. feathers-authentication@0.8.0 is changing so that you don't have to call the I'm going to have to think about this. Any reason you can't just treat them the same? Regardless of whether they were deleted, it's still now a missing record and an invalid id. |
I think the idea is to get a different error message ( In the new auth we'd just check for a |
agreed the new version will completely resolve this. |
A different error message would have been nice, but if that behaviour is changed in the next version of feathers-authenticate then thats fine for me. The idea was to show a login form if the user id is wrong/no longer exists and otherwise show a 404 page for missing resources. The issue came up after resetting the database. I still had the old token stored in the browser but from the error message it wasn't really clear that the user is was no longer valid. |
If the user is missing it will now return a proper 404 error code with v1.x of auth. Let us know if you are still having issues and we'd be happy to revisit. |
Actually I'm getting no error at all! To recap:
Is this the intended behaviour until the token expires? |
If I request a resource with a token for a user who got deleted, I get a 404 response:
How can I distinguish between a non-existent user and an actual missing resource?
The text was updated successfully, but these errors were encountered: