Closed neomorphic closed 1 year ago
Here is an example query that should return a 404 error:
https://neuprint.janelia.org/api/custom/custom payload: { "cypher": "MATCH (n: Neuron) WHERE n.bodyId in [10130] RETURN n.bodyId AS id, n.type AS type", "dataset": "vnc" }
There is no vnc data set on the neuprint.janelia.org server.
In this scenario, it is possible for an application to submit a cypher query to a neuprint server expecting to get data about a dataset that is not present in the database. Rather than the server sending a 404 not found to explain that the data set is missing, the server responds with a 200 response to indicate that the data was searched and no results were found. Currently if the dataset parameter of the body request is missing, the most recent dataset available on the server is searched. We probably shouldn't break that functionality, but if a dataset is specified and is not found, it should return a 404.