capture underlying exception when only one of the generations fails

This commit is contained in:
Abi Raja 2024-09-17 16:56:09 +02:00
parent 659b82b214
commit 7b08507b61

View File

@ -396,7 +396,9 @@ async def stream_code(websocket: WebSocket):
completions[index] = ""
print("Generation failed for variant", index)
try:
raise Exception("One of the generations failed")
raise Exception(
"One of the generations failed"
) from completion
except:
sentry_sdk.capture_exception()