sap_client: asXML 이 아닌 XML/HTML 응답(로그인 페이지 등)은 오류로 판정
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
e23140b7af
commit
89deb108b0
+5
-1
@@ -124,7 +124,11 @@ def parse_asxml(text: str) -> dict:
|
|||||||
return out
|
return out
|
||||||
|
|
||||||
data_el = root.find(".//DATA")
|
data_el = root.find(".//DATA")
|
||||||
data = coerce_lists(xml_to_data(data_el)) if data_el is not None else {}
|
if data_el is None: # asXML 이 아닌 XML/HTML (로그인 페이지 등) — 성공으로 오인하지 않게
|
||||||
|
out["error"] = f"SAP 응답이 아님 (루트 <{root.tag}>, DATA 없음)"
|
||||||
|
out["return"] = {"type": "X", "message": out["error"]}
|
||||||
|
return out
|
||||||
|
data = coerce_lists(xml_to_data(data_el))
|
||||||
out["parsed"] = data
|
out["parsed"] = data
|
||||||
ret = data.get("RETURN") if isinstance(data, dict) else None
|
ret = data.get("RETURN") if isinstance(data, dict) else None
|
||||||
if isinstance(ret, dict):
|
if isinstance(ret, dict):
|
||||||
|
|||||||
Reference in New Issue
Block a user