Commit c9796b2
refactor(init): scope numeric org ID fix to sentry init only
The previous fix to resolveOrgFromDsn was too broad — returning null
broke DSN org auto-detection for read commands like `sentry issue list`
that work fine with numeric org IDs.
Revert resolveOrgFromDsn to its original behavior. Instead, handle the
numeric ID resolution in resolveOrgSlug (local-ops.ts), which is only
used by sentry init's project creation path. When the prefetched org is
a raw numeric string, attempt to resolve it to a slug via the org regions
cache (getOrgByNumericId). On cache miss — empty cache or org from a
different Sentry account — fall through to listOrganizations() so the
user can select from their accessible orgs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 83cb197 commit c9796b2
3 files changed
Lines changed: 20 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
679 | 691 | | |
680 | 692 | | |
681 | 693 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
246 | 239 | | |
247 | 240 | | |
248 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
92 | 91 | | |
93 | 92 | | |
94 | 93 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 94 | | |
100 | 95 | | |
101 | 96 | | |
| |||
123 | 118 | | |
124 | 119 | | |
125 | 120 | | |
126 | | - | |
127 | 121 | | |
128 | 122 | | |
129 | 123 | | |
| |||
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
148 | | - | |
149 | 142 | | |
150 | 143 | | |
151 | 144 | | |
| |||
205 | 198 | | |
206 | 199 | | |
207 | 200 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 201 | + | |
228 | 202 | | |
229 | 203 | | |
230 | 204 | | |
| |||
236 | 210 | | |
237 | 211 | | |
238 | 212 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | 213 | | |
244 | 214 | | |
245 | 215 | | |
246 | 216 | | |
247 | | - | |
248 | | - | |
| 217 | + | |
249 | 218 | | |
250 | 219 | | |
251 | 220 | | |
| |||
0 commit comments