Skip to content

Commit a53597c

Browse files
author
liuhuiqi.7
committed
feat(ark_api_key): error handle
Change-Id: Ic22668d33e806708d1276bebae9d02005aa84799
1 parent 1b50b8b commit a53597c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

volcenginesdkarkruntime/_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ def _sync_load_cert_by_auth(self, ep: str) -> str:
361361
body={"model": ep}, cast_to=self.CertificateResponse)
362362
except Exception as e:
363363
raise ArkAPIError("Getting Certificate failed: %s\n" % e)
364+
if 'error' in resp:
365+
raise ArkAPIError("Getting Certificate failed: %s\n" % resp['error'])
364366
return resp['Certificate']
365367

366368
def _save_cert_to_file(self, ep: str, cert_pem: str):

0 commit comments

Comments
 (0)