Skip to content

Commit 4e83ccb

Browse files
committed
Fix: get detailed error from Instagram container status
1 parent bba231e commit 4e83ccb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/instagram_publisher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ async def _wait_for_container(self, container_id: str):
184184
"""Poll container status until FINISHED."""
185185
endpoint = f"{GRAPH_API_BASE}/{container_id}"
186186
params = {
187-
"fields": "status_code,status",
187+
"fields": "status_code,status,error_type,error_message",
188188
"access_token": self.access_token,
189189
}
190190

@@ -201,7 +201,7 @@ async def _wait_for_container(self, container_id: str):
201201
if status == "FINISHED":
202202
return
203203
elif status == "ERROR":
204-
raise RuntimeError(f"Container error: {data.get('status')}")
204+
raise RuntimeError(f"Container error: {data}")
205205

206206
raise TimeoutError(f"Container {container_id} never finished.")
207207

0 commit comments

Comments
 (0)