Repository navigation
docs: add #807 throw-site inventory (stage 1) - #1121
SHAI-krishna-Dobhal wants to merge 2 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Hi @SHAI-KrishnaDobhal, Thank you for raising the PR and putting together the Stage 1 inventory. Could you please move the file under |
Classify all 340 bare `throw new Error(` sites in core/src (@934d6bf) by failure mode, as requested on google#583: - 185 map to an existing typed error (154 InputValidationError, 15 NotFoundError, 7 ToolExecutionError, 6 AlreadyExistsError, 3 SessionNotFoundError) - 105 need a new type; 6 proposed: UnsupportedFeatureError, UpstreamServiceError, InvalidWorkflowGraphError, SkillFormatError, AuthenticationError, ServiceNotConfiguredError - 49 stay bare Error (invariants, abstract stubs, unreachable) - 1 is a JSDoc example, not code Also confirms StaleSessionError is not needed (adk-js reloads stale sessions instead of throwing), lists ~15 rewraps that drop the original error, and proposes a per-area order for stage 2. Refs google#807
1e312b9 to
18542f0
Compare
|
@Varun-S10! Done:
|
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
throw new Errorsites and adopt the typed-errors module (232 throws across 90 files) #8072. Or, if no issue exists, describe the change:
Problem:
#583 added typed errors, but every one of the 340
throw new Error(sites incore/srcstill throws a bareError. Callers can only tell failures apart by matching onerror.message.Solution:
Adds
issue-807/throw-inventory.md, a Stage 1 inventory sorting every site into: fits an existing type (185), needs one of 6 proposed new types (105), or keep as bareError(49). It also confirmsStaleSessionErrorisn't needed, lists ~15 rewraps that drop the original error, and proposes a per-area order for Stage 2.Testing Plan
Documentation only; no code changes. Site count is reproducible with:
git grep -n "throw new Error(" -- 'core/src/**/*.ts' | wc -l→ 340 on934d6bf.Unit Tests:
Manual End-to-End (E2E) Tests:
N/A, docs only.
Checklist