mirror of
https://github.com/Comfy-Org/comfy-python-sdk.git
synced 2026-11-04 23:37:47 +00:00
[PR #11] [MERGED] fix: map entity-specific 404 codes (job/asset_not_found) to NotFound #20
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
effort:medium
effort:small
effort:small
effort:trivial
priority:nice-to-have
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-python-sdk#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-python-sdk/pull/11
Author: @wei-hai
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @wei-hai
Base:
main← Head:fix/map-entity-notfound-codes📝 Commits (1)
d0fa09dfix: map entity-specific 404 codes (job/asset_not_found) to NotFound📊 Changes
2 files changed (+23 additions, -0 deletions)
View changed files
📝
src/comfy_sdk/exceptions.py(+6 -0)➕
tests/test_error_mapping.py(+17 -0)📄 Description
Testing against prod,
client.jobs.get("<missing-uuid>")raised a genericApiError("Job not found") instead of the typedNotFoundthe SDK contract promises.public-api returns entity-specific 404 error codes (
job_not_found,asset_not_found) even though the spec documents the genericnot_found, so those codes fell through_BY_CODEto the base error.Fix: map
job_not_foundandasset_not_found→NotFound. A parametrized test covers all three 404 codes. (Reconciling the spec/server code set — generic vs. entity-specific — is a separate follow-up.)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.