@@ -19,7 +19,7 @@ def add_deployment(api_key, security_level, machine_type, deployment_name, infer
1919 },
2020 )
2121 if response .status_code != 200 :
22- raise DeploymentApiError (response .text )
22+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
2323 result = response .json ()
2424 return result
2525
@@ -28,7 +28,7 @@ def get_deployment(api_key, deployment_id):
2828 url = f"{ DEDICATED_DEPLOYMENT_URL } /get"
2929 response = requests .get (url , json = {"api_key" : api_key , "deployment_id" : deployment_id })
3030 if response .status_code != 200 :
31- raise DeploymentApiError (response .text )
31+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
3232 result = response .json ()
3333 return result
3434
@@ -37,7 +37,7 @@ def list_deployment(api_key):
3737 url = f"{ DEDICATED_DEPLOYMENT_URL } /list"
3838 response = requests .get (url , json = {"api_key" : api_key })
3939 if response .status_code != 200 :
40- raise DeploymentApiError (response .text )
40+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
4141 result = response .json ()
4242 return result
4343
@@ -46,6 +46,6 @@ def delete_deployment(api_key, deployment_id):
4646 url = f"{ DEDICATED_DEPLOYMENT_URL } /delete"
4747 response = requests .post (url , json = {"api_key" : api_key , "deployment_id" : deployment_id })
4848 if response .status_code != 200 :
49- raise DeploymentApiError (response .text )
49+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
5050 result = response .json ()
5151 return result
0 commit comments