Commit dc659c2
fix: address latest review — status union, error info leak, create test
1. Drop the "active,revoked" literal from ListInput.status. Reviewer
flagged the asymmetry: listing one CSV combination implies it's
canonical, but the API accepts any order ("active,revoked" or
"revoked,active") and may add filter-only values. Simplified to
`"active" | "revoked" | (string & {})`. The JSDoc already documents
the CSV form, so autocomplete for the canonical single values stays
and arbitrary strings still type-check.
2. Remove the raw response-body snippet from the batchCreate shape
validation error. The previous message embedded up to 200 chars of
the unexpected body, which could leak sensitive data (auth details,
request echoes) into client-side error logs. Replaced with a static
"Unexpected response shape from POST /v1/qurls/batch" message.
Added a comment explaining why the snippet is intentionally absent.
3. Add qurl_id and label assertions to the existing "creates a QURL"
test. The PR adds both fields to CreateOutput but the existing test
only checked resource_id and qurl_link, leaving the new required
fields without a regression guard.
Tests: 63 (unchanged — #3 tightens an existing test rather than
adding a new one).
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent 1f3cd6d commit dc659c2
3 files changed
Lines changed: 21 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| |||
1562 | 1567 | | |
1563 | 1568 | | |
1564 | 1569 | | |
1565 | | - | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
1566 | 1575 | | |
1567 | 1576 | | |
1568 | 1577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | | - | |
213 | | - | |
214 | | - | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
88 | 89 | | |
89 | | - | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
0 commit comments