瀏覽代碼

Raise json error

Arkadiusz Ryś 2 年之前
父節點
當前提交
8871520c8d
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      graph_exploring_tool/query.py

+ 3 - 0
graph_exploring_tool/query.py

@@ -1,3 +1,4 @@
+import json.decoder
 from dataclasses import dataclass, field
 from typing import List
 from urllib.error import URLError
@@ -89,4 +90,6 @@ def perform_query(endpoint: str, query_text: str, post: bool = False) -> dict:
         raise
     except URLError:
         raise
+    except json.decoder.JSONDecodeError:
+        raise
     return ret