@@ -19,7 +19,7 @@ def add_deployment(api_key, security_level, machine_type, deployment_name, infer
19
19
},
20
20
)
21
21
if response .status_code != 200 :
22
- raise DeploymentApiError (response .text )
22
+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
23
23
result = response .json ()
24
24
return result
25
25
@@ -28,7 +28,7 @@ def get_deployment(api_key, deployment_id):
28
28
url = f"{ DEDICATED_DEPLOYMENT_URL } /get"
29
29
response = requests .get (url , json = {"api_key" : api_key , "deployment_id" : deployment_id })
30
30
if response .status_code != 200 :
31
- raise DeploymentApiError (response .text )
31
+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
32
32
result = response .json ()
33
33
return result
34
34
@@ -37,7 +37,7 @@ def list_deployment(api_key):
37
37
url = f"{ DEDICATED_DEPLOYMENT_URL } /list"
38
38
response = requests .get (url , json = {"api_key" : api_key })
39
39
if response .status_code != 200 :
40
- raise DeploymentApiError (response .text )
40
+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
41
41
result = response .json ()
42
42
return result
43
43
@@ -46,6 +46,6 @@ def delete_deployment(api_key, deployment_id):
46
46
url = f"{ DEDICATED_DEPLOYMENT_URL } /delete"
47
47
response = requests .post (url , json = {"api_key" : api_key , "deployment_id" : deployment_id })
48
48
if response .status_code != 200 :
49
- raise DeploymentApiError (response .text )
49
+ raise DeploymentApiError (f" { response .status_code } : { response . text } " )
50
50
result = response .json ()
51
51
return result
0 commit comments