xenfra-sdk 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -135,7 +135,7 @@ class DeploymentsManager(BaseManager):
|
|
|
135
135
|
import httpx
|
|
136
136
|
|
|
137
137
|
headers = {
|
|
138
|
-
"Authorization": f"Bearer {self._client.
|
|
138
|
+
"Authorization": f"Bearer {self._client._token}",
|
|
139
139
|
"Accept": "text/event-stream",
|
|
140
140
|
"Content-Type": "application/json",
|
|
141
141
|
}
|
|
@@ -149,8 +149,16 @@ class DeploymentsManager(BaseManager):
|
|
|
149
149
|
headers=headers,
|
|
150
150
|
timeout=600.0, # 10 minute timeout for deployments
|
|
151
151
|
) as response:
|
|
152
|
+
# Check status before consuming stream
|
|
152
153
|
if response.status_code not in [200, 201, 202]:
|
|
153
|
-
|
|
154
|
+
# For streaming responses, we can't access .text directly
|
|
155
|
+
# Read the error from the stream
|
|
156
|
+
error_lines = []
|
|
157
|
+
for line in response.iter_lines():
|
|
158
|
+
error_lines.append(line)
|
|
159
|
+
if len(error_lines) > 10: # Limit error message size
|
|
160
|
+
break
|
|
161
|
+
error_text = "\n".join(error_lines) if error_lines else "Unknown error"
|
|
154
162
|
raise XenfraAPIError(
|
|
155
163
|
status_code=response.status_code,
|
|
156
164
|
detail=f"Deployment failed: {error_text}"
|
|
@@ -18,7 +18,7 @@ xenfra_sdk/privacy.py,sha256=ksGf5L9PVtRP-xZS3T-Gj7MKfexTqIMgbFLoYkIESOE,5662
|
|
|
18
18
|
xenfra_sdk/recipes.py,sha256=g_UKQIcdSokYh7zn186mzDTr08P034-KZ1iiDNELyP4,877
|
|
19
19
|
xenfra_sdk/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
xenfra_sdk/resources/base.py,sha256=C6BuZfhR-oU5ecHSfkGG6ZLU6MHGXUyCWoy1F-yTIf8,84
|
|
21
|
-
xenfra_sdk/resources/deployments.py,sha256=
|
|
21
|
+
xenfra_sdk/resources/deployments.py,sha256=sgxSFBwI4bf5-vS28ruCwrNN72c5UFoMFefdXRjgE30,7765
|
|
22
22
|
xenfra_sdk/resources/intelligence.py,sha256=Y11K6_iXfm2QKTbH1vUmt45MifLoVtZtlHEkqbzmTzs,3418
|
|
23
23
|
xenfra_sdk/resources/projects.py,sha256=EsCVXmqkhWl_Guz_8WDQDi3kAm1Wyg1rjXcyAigPD6E,3712
|
|
24
24
|
xenfra_sdk/security.py,sha256=Px887RRb1BUDXaPUrxmQITJ1mHyOyupCJqEDZ78F7Tk,1240
|
|
@@ -26,6 +26,6 @@ xenfra_sdk/templates/Dockerfile.j2,sha256=GXc0JiaF-HsxTQS15Gs2fcvsIhA1EHnwapdFVi
|
|
|
26
26
|
xenfra_sdk/templates/cloud-init.sh.j2,sha256=NKIwtL9OgnlK2NnYRZI3gWC9aYl6wNPsS6r14g8eHQQ,2290
|
|
27
27
|
xenfra_sdk/templates/docker-compose.yml.j2,sha256=qMHiatuZlxiYZ1pE_g2ag1M798MvQbeq0cVTVK07jkM,893
|
|
28
28
|
xenfra_sdk/utils.py,sha256=d8eCjjV32QwqoJa759CEcETnnsjG5qVKDLQ84yYtlus,3898
|
|
29
|
-
xenfra_sdk-0.1.
|
|
30
|
-
xenfra_sdk-0.1.
|
|
31
|
-
xenfra_sdk-0.1.
|
|
29
|
+
xenfra_sdk-0.1.6.dist-info/WHEEL,sha256=KSLUh82mDPEPk0Bx0ScXlWL64bc8KmzIPNcpQZFV-6E,79
|
|
30
|
+
xenfra_sdk-0.1.6.dist-info/METADATA,sha256=3Ey9dYNU-gA6scZTDLldudhPrgR2kkB5ggh_g86-yQU,3980
|
|
31
|
+
xenfra_sdk-0.1.6.dist-info/RECORD,,
|
|
File without changes
|