Skip to content

Commit 53b893f

Browse files
more skippable messages (#387)
1 parent 177d1f4 commit 53b893f

2 files changed

Lines changed: 23 additions & 1 deletion

File tree

packages/source-stripe/src/index.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,18 @@ describe('StripeSource', () => {
916916
'/v1/sigma/scheduled_query_runs',
917917
'API surface is not enabled',
918918
],
919+
[
920+
'billing_alerts',
921+
'Your custom plan does not include alerts in livemode.',
922+
'/v1/billing/alerts',
923+
'does not include alerts in livemode',
924+
],
925+
[
926+
'billing_credit_grants',
927+
'Your custom plan does not include billing credit grants in livemode.',
928+
'/v1/billing/credit_grants',
929+
'does not include billing credit grants in livemode',
930+
],
919931
])(
920932
'emits stream_status skip for known skippable Stripe list errors (%s)',
921933
async (_label, apiMessage, path, reasonSubstring) => {

packages/source-stripe/src/src-list-api.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,16 @@ const SKIPPABLE_ERROR_MESSAGES = [
162162
// "This account is not eligible for Climate Orders.
163163
// [GET /v1/climate/orders (400)]"
164164
'This account is not eligible for Climate Orders',
165+
166+
// billing_alerts
167+
// "Your custom plan does not include alerts in livemode.
168+
// [GET /v1/billing/alerts (400)]"
169+
'does not include alerts in livemode',
170+
171+
// billing_credit_grants
172+
// "Your custom plan does not include billing credit grants in livemode.
173+
// [GET /v1/billing/credit_grants (400)]"
174+
'does not include billing credit grants in livemode',
165175
]
166176

167177
export function isSkippableError(err: unknown): boolean {
@@ -536,7 +546,7 @@ async function* iterateStream(opts: {
536546
supportsForwardPagination,
537547
}),
538548
//concurrency: 100, // rate limiter is the real bottleneck
539-
concurrency: 1, // serialized for reliability; parallelism re-enabled if data gaps are due to parallelism
549+
concurrency: 1, // serialized for reliability; parallelism re-enabled if data gaps are due to parallelism
540550
subdivisionFactor,
541551
})
542552

0 commit comments

Comments
 (0)