Commit 611df50
fix(ramps): show localized error for non-Error callback rejections
Bugbot flagged that wrapping non-Error rejections via `new Error(String(fetchError))`
makes `normalizedError.message` truthy for almost any value (e.g., "undefined",
"[object Object]", "null"), so the localized fallback was nearly unreachable and
users could see those raw strings as the error. Mirror the `handleOnRefresh` guard
(`fetchError instanceof Error && fetchError.message`) for the user-facing message
while keeping the normalized Error for `Logger.error`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0a9a2cc commit 611df50
2 files changed
Lines changed: 31 additions & 2 deletions
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
394 | 423 | | |
395 | 424 | | |
396 | 425 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
0 commit comments