瀏覽代碼

Fix raising RPC errors with no message

Tulir Asokan 4 年之前
父節點
當前提交
ba62a6769d
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      mausignald/errors.py

+ 1 - 1
mausignald/errors.py

@@ -76,7 +76,7 @@ def make_response_error(data: Dict[str, Any]) -> ResponseError:
         error_data = {"message": error_data}
     elif not isinstance(error_data, dict):
         error_data = {"message": str(error_data)}
-    elif "message" not in error_data:
+    if "message" not in error_data:
         error_data["message"] = "<no message>"
     error_type = data["error_type"]
     try: