Skip to content

Commit 30584ae

Browse files
qq9340100claude
andauthored
docs(types): correct thrown-http-error.ts doc comment for #8634's re-point (#8847)
The TSDoc for ThrownHttpError.declaredStatus said the fallback-probe workaround (`resolveThrownHttpError(e, 0).status !== 0`) was "still spelled by hand in packages/rest's publish-classification suite". PR #8814 (closing #8634) re-pointed both call sites in that suite at `declaredStatus` directly, so the clause is now false. Corrected it to name the current call-site spelling instead. Fixes #8810 Claude-Session: https://claude.ai/code/session_01NaS1PAHJcPfAA2acnV53Tn Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6b6b606 commit 30584ae

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/types/src/thrown-http-error.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ export interface ThrownHttpError {
8585
* to `status: 500`, so a caller that must tell "the producer said so" from
8686
* "I supplied the default" cannot read it off the value. The workaround in
8787
* the repo was to probe this function with a fallback no producer declares
88-
* — `resolveThrownHttpError(e, 0).status !== 0`, still spelled by hand in
89-
* `packages/rest`'s publish-classification suite. That is a magic number
88+
* — `resolveThrownHttpError(e, 0).status !== 0`. That is a magic number
9089
* standing in for a fact this function already computed, and it fails
91-
* silently the day a producer declares the sentinel. So the fact is stated.
90+
* silently the day a producer declares the sentinel. So the fact is stated;
91+
* `packages/rest`'s publish-classification suite now reads
92+
* `resolveThrownHttpError(error).declaredStatus !== undefined` instead of
93+
* hand-spelling the workaround.
9294
*
9395
* ## Who needs the distinction
9496
*

0 commit comments

Comments
 (0)