Skip to content

Commit b758170

Browse files
author
Matt Sokoloff
committed
update invalid query error
1 parent 31b90eb commit b758170

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

labelbox/schema/dataset.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,16 +206,17 @@ def convert_item(item):
206206
url_param = "jsonUrl"
207207
query_str = """mutation AppendRowsToDatasetPyApi($%s: ID!, $%s: String!){
208208
appendRowsToDataset(data:{datasetId: $%s, jsonFileUrl: $%s}
209-
){ taskId accepted } } """ % (dataset_param, url_param,
209+
){ taskId accepted errorMessage } } """ % (dataset_param, url_param,
210210
dataset_param, url_param)
211211
res = self.client.execute(query_str, {
212212
dataset_param: self.uid,
213213
url_param: descriptor_url
214214
})
215215
res = res["appendRowsToDataset"]
216216
if not res["accepted"]:
217+
msg = res['errorMessage']
217218
raise InvalidQueryError(
218-
"Server did not accept DataRow creation request")
219+
f"Server did not accept DataRow creation request. {msg}")
219220

220221
# Fetch and return the task.
221222
task_id = res["taskId"]

0 commit comments

Comments
 (0)