Commit f535989
fix(billing): log declined tier-change cards as warn
Plan tier-change handlers logged every Stripe failure at error severity
before checking the decline code, so an expected card_declined /
insufficient_funds decline (surfaced to the user as a 402) fired a
server-error alert. Move the decline check ahead of the error log and
log those expected declines at warn instead.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2c63fea commit f535989
2 files changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
535 | 534 | | |
536 | 535 | | |
537 | 536 | | |
538 | 537 | | |
539 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
540 | 542 | | |
541 | 543 | | |
542 | 544 | | |
543 | 545 | | |
544 | 546 | | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
545 | 551 | | |
546 | 552 | | |
547 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1310 | 1310 | | |
1311 | 1311 | | |
1312 | 1312 | | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
1316 | | - | |
1317 | 1313 | | |
1318 | 1314 | | |
1319 | 1315 | | |
1320 | | - | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
1321 | 1319 | | |
1322 | 1320 | | |
1323 | 1321 | | |
1324 | 1322 | | |
1325 | 1323 | | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
1326 | 1327 | | |
1327 | 1328 | | |
1328 | 1329 | | |
1329 | 1330 | | |
1330 | 1331 | | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1331 | 1336 | | |
1332 | 1337 | | |
1333 | 1338 | | |
| |||
0 commit comments