connectome-neuprint / neuPrintHTTP

Implements connectomics REST interface
5 stars 2 forks source link

/custom/custom dataset validation is case sensitive, but does not throw errors #56

Closed neomorphic closed 1 year ago

neomorphic commented 2 years ago

Dataset validation is case sensitive and does a simple string comparison by looking in DatasetStores map[string]SimpleStore for the passed string. When looking for ABG, neuPrintHTTP will not find a result, and will use the most recent dataset, rather than throw a 404 error.


https://neuprint-pre.janelia.org/api/custom/custom
{
    "cypher": "MATCH (n: Neuron) WHERE  n.bodyId in [5813108066] RETURN n.bodyId AS id, n.type AS type",
    "dataset": "ABG"
}

returns

{
    "columns": [
        "id",
        "type"
    ],
    "data": [
        [
            5813108066,
            "FS4B"
        ]
    ],
    "debug": "MATCH (n: Neuron) WHERE  n.bodyId in [5813108066] RETURN n.bodyId AS id, n.type AS type"
}

but using the correct case for the dataset

https://neuprint-pre.janelia.org/api/custom/custom
{
    "cypher": "MATCH (n: Neuron) WHERE  n.bodyId in [5813108066] RETURN n.bodyId AS id, n.type AS type",
    "dataset": "abg"
}

returns

{
    "columns": [
        "id",
        "type"
    ],
    "data": [],
    "debug": "MATCH (n: Neuron) WHERE  n.bodyId in [5813108066] RETURN n.bodyId AS id, n.type AS type"
}
neomorphic commented 2 years ago

This is similar to issue #54