Skip to content

Return failed job responses for development API generator errors - #589

Open
betacatsling wants to merge 1 commit into
runpod:mainfrom
betacatsling:fix/dev-generator-errors
Open

Return failed job responses for development API generator errors#589
betacatsling wants to merge 1 commit into
runpod:mainfrom
betacatsling:fix/dev-generator-errors

Conversation

@betacatsling

Copy link
Copy Markdown

Generator exceptions in the development API currently become KeyError: 'output' because the aggregation loops assume every item is a successful result. Preserve the error item and return a FAILED job response for /runsync, /status, and /stream. The queued job is removed after a failed status/stream request.

The regression uses real sync and async generator handlers through an in-memory ASGI client, with failures both before and after a yielded result. All 12 cases fail on the unchanged base and pass with the fix. Local validation: 644 unit tests passed, including the repository's coverage check; cloud E2E and performance tests were excluded. Black checked the new test and changed production ranges; git diff --check passed. Proxy environment variables were cleared for the offline unit suite.

This is the development-API error aggregation path from #306; #587 changes error delivery in the separate production handle_job path.

AI assistance was used for implementation and local verification. No RunPod resources were provisioned.

Fixes #306.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Serverless generator incorrectly handles exceptions

1 participant