-
Notifications
You must be signed in to change notification settings - Fork 18
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
Fix UsersResponderV1 to return None and not an exception when user not found #297
Comments
I thought we decided that |
In #315 I've changed |
Yes, this is fine for now. I opened this issue before and completely forgot about it. I say for now, because I thing that the responder should return an option, and the route should then throw an exception, if it want's. This way, we decouple the routes behaviour from the responder. Generally speaking, I see two different use cases for a responder: (1) Requesting something through the route, which should return (2) Internal use, by asking one responder from another for something. The response in this case should be preferably But to support both cases in this manner, we would need to refactor |
Thanks for looking at this. Currently when responders talk to each other, they can get |
Up until now ;-) But since the |
OK :) It's not hard to change this if we need to. |
I thought about this a bit more. If this is needed only in rare cases, then we could probably write a method that turns the result/exception into an Option. This way, we don't need to refactor the responders themselves. Also, I had already made these changes in the |
#315) * fix (salsah): Fix the creation of multiple linking properties (#277). - Add a button for getting the creator and creation date of a value (#309, WIP) - Change UsersResponderV1 not to return an Option, relying on exceptions instead (#297). * feature (salsah): Finish implementing #309. * test (add biblio-data): add biblio-data to the test data in the browser tests * fix (webapi): Use FILTER NOT EQUALS instead of MINUS in changeLink.scala.txt for better performance on Fuseki.
When a user is not found, then the
UsersResponderV1
should returnNone
and not aNotFoundException
which is translated to into a404
status code .The text was updated successfully, but these errors were encountered: