I am using the newest Spring Data for Neo4j. In this projects i have different groups which are reachable over the url /group/{id}/project which should return a list of all projects the user has access to. This stuff works fine, but if the user enters a real big number as groupId which does not exist in the database I got a
org.neo4j.graphdb.NotFoundException: Node 400 not found
My query looks like
@Query("START a=node({userId}), b=node({groupId}) match a-[:user_belongs_to]-b return b")
GroupEntity getGroup(@Param("userId") Long userId, @Param("groupId") Long groupId);
Even if I use the method findOne() from the GraphRepository interface I got this exception.
So is it possible to tell SDN instead of throwing this exception returning null? Or does i have to catch every possible runtime exception?
I want to throw exceptions by my own i.e. NoSuchGroup, NoSuchUser..
I am using SDN 3.3.0.Release.
Thank you