Commit 490293c
kai-agent-free
fix: throw SdkError with CapabilityNotSupported code instead of generic Error
Replace the generic `throw new Error()` in `assertCapability()` with
`throw new SdkError(SdkErrorCode.CapabilityNotSupported, ...)` so that
callers can programmatically distinguish unsupported-capability errors
from other failures without fragile message-string matching.
Fixes #4301 parent 8cdb4bb commit 490293c
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
| 437 | + | |
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
421 | 427 | | |
422 | 428 | | |
423 | 429 | | |
| |||
0 commit comments