We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a4cb10 commit 19f3561Copy full SHA for 19f3561
volcenginesdkarkruntime/_client.py
@@ -379,6 +379,9 @@ def _load_api_key(
379
380
381
class CertificateResponse(BaseModel):
382
+ error: Dict[str, str] = None
383
+ """The error information."""
384
+
385
Certificate: str
386
"""The certificate content."""
387
@@ -455,8 +458,8 @@ def _sync_load_cert_by_auth(self, ep: str) -> str:
455
458
)
456
459
except Exception as e:
457
460
raise ArkAPIError("Getting Certificate failed: %s\n" % e)
- if "error" in resp:
- raise ArkAPIError("Getting Certificate failed: %s\n" % resp["error"])
461
+ if resp.error is not None:
462
+ raise ArkAPIError("Getting Certificate failed: %s\n" % resp.error)
463
return resp.Certificate
464
465
def _save_cert_to_file(self, ep: str, cert_pem: str):
0 commit comments