ranking-agent / strider

A TRAPI-compliant component of ARAGORN that queries distributed KPs and assembles answers to user questions.
MIT License
3 stars 0 forks source link

Provide more information for bad predicate #182

Closed patrickkwang closed 2 months ago

patrickkwang commented 3 years ago

input

    {"message": {"query_graph": {
        "nodes": {
            "n0": {
                "ids": ["MONDO:0005737"],
                "categories": ["biolink:Disease"]
            },
            "n1": {
                "categories": ["biolink:ChemicalSubstance"]
            }
        },
        "edges": {
            "e01": {
                "subject": "n0",
                "object": "n1",
                "predicates": ["biolink:treats"]
            }
        }
    }}}

output

200 response with body

{"message":{"query_graph":{"nodes":{"n1":{"id":null,"category":null,"is_set":false,"categories":["biolink:ChemicalSubstance"]},"n0":{"id":null,"category":null,"is_set":false,"ids":["MONDO:0005737"],"categories":["biolink:Disease"]}},"edges":{"e01":{"subject":"n0","object":"n1","predicate":null,"relation":null,"predicates":["biolink:treats"]}}},"knowledge_graph":{"nodes":{},"edges":{}},"results":[]},"logs":[{"timestamp":"2021-05-12T18:29:26.808667","level":"ERROR","code":null,"message":"{\"message\": \"Could not find a plan to traverse query graph\", \"line_number\": 157}"}],"status":null}

expected

200 response with logs indicating that biolink:treats cannot have subject biolinkDisease and object biolink:ChemicalSubstance, per the biolink model.

maximusunc commented 2 months ago

OBE. We won't be receiving queries like this through the UI/ARS.