[PR #14] [MERGED] fix: map entity-specific 404 codes in high-level toSdkError #24

Closed
opened 2026-10-31 22:03:55 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-typescript-sdk/pull/14
Author: @wei-hai
Created: 7/22/2026
Status: ✅ Merged
Merged: 7/22/2026
Merged by: @wei-hai

Base: main ← Head: fix/highlevel-notfound-codes


📝 Commits (1)

  • 8e60ed2 fix: map entity-specific 404 codes in the high-level toSdkError too

📊 Changes

2 files changed (+7 additions, -0 deletions)

View changed files

📝 src/sdk/exceptions.test.ts (+2 -0)
📝 src/sdk/exceptions.ts (+5 -0)

📄 Description

Follow-up to #13. That fix added job_not_found/asset_not_found → NotFound to the low-level error map, but the high-level toSdkError (in sdk/exceptions.ts, what the client actually surfaces) has its own code map that still fell through to a generic ComfyError. So a missing job/asset was still not a typed NotFound at the SDK surface.

Add the codes to the high-level map too, with a test. Found while running the TS SDK through prod conformance.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-typescript-sdk/pull/14 **Author:** [@wei-hai](https://github.com/wei-hai) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@wei-hai](https://github.com/wei-hai) **Base:** `main` ← **Head:** `fix/highlevel-notfound-codes` --- ### 📝 Commits (1) - [`8e60ed2`](https://github.com/Comfy-Org/comfy-typescript-sdk/commit/8e60ed22346c5d10a5c57da8924ad2986c0ecd77) fix: map entity-specific 404 codes in the high-level toSdkError too ### 📊 Changes **2 files changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `src/sdk/exceptions.test.ts` (+2 -0) 📝 `src/sdk/exceptions.ts` (+5 -0) </details> ### 📄 Description Follow-up to #13. That fix added `job_not_found`/`asset_not_found` → `NotFound` to the **low-level** error map, but the **high-level** `toSdkError` (in `sdk/exceptions.ts`, what the client actually surfaces) has its own code map that still fell through to a generic `ComfyError`. So a missing job/asset was still not a typed `NotFound` at the SDK surface. Add the codes to the high-level map too, with a test. Found while running the TS SDK through prod conformance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:03:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-typescript-sdk#24
No description provided.