mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 00:16:23 +02:00
SPARQL CLI reports errors from service (#794)
SPARQL query CLI ignores errors from the SPARQL service and just emits a zero row output. This change causes an error to be reported
This commit is contained in:
parent
ffe310af7c
commit
67cfa80836
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