mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-08 04:42:11 +02:00
SPARQL query error reporting
This commit is contained in:
parent
ffe310af7c
commit
071c99022e
1 changed files with 5 additions and 0 deletions
|
|
@ -62,6 +62,11 @@ def sparql_query(url, token, flow_id, query, user, collection, limit,
|
|||
limit=limit,
|
||||
batch_size=batch_size,
|
||||
):
|
||||
if "error" in response:
|
||||
err = response["error"]
|
||||
msg = err.get("message", err) if isinstance(err, dict) else err
|
||||
raise RuntimeError(msg)
|
||||
|
||||
query_type = response.get("query-type", "select")
|
||||
|
||||
# ASK queries - just print and return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue