Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions packages/source-stripe/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,18 @@ describe('StripeSource', () => {
'/v1/sigma/scheduled_query_runs',
'API surface is not enabled',
],
[
'billing_alerts',
'Your custom plan does not include alerts in livemode.',
'/v1/billing/alerts',
'does not include alerts in livemode',
],
[
'billing_credit_grants',
'Your custom plan does not include billing credit grants in livemode.',
'/v1/billing/credit_grants',
'does not include billing credit grants in livemode',
],
])(
'emits stream_status skip for known skippable Stripe list errors (%s)',
async (_label, apiMessage, path, reasonSubstring) => {
Expand Down
12 changes: 11 additions & 1 deletion packages/source-stripe/src/src-list-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,16 @@ const SKIPPABLE_ERROR_MESSAGES = [
// "This account is not eligible for Climate Orders.
// [GET /v1/climate/orders (400)]"
'This account is not eligible for Climate Orders',

// billing_alerts
// "Your custom plan does not include alerts in livemode.
// [GET /v1/billing/alerts (400)]"
'does not include alerts in livemode',

// billing_credit_grants
// "Your custom plan does not include billing credit grants in livemode.
// [GET /v1/billing/credit_grants (400)]"
'does not include billing credit grants in livemode',
]

export function isSkippableError(err: unknown): boolean {
Expand Down Expand Up @@ -536,7 +546,7 @@ async function* iterateStream(opts: {
supportsForwardPagination,
}),
//concurrency: 100, // rate limiter is the real bottleneck
concurrency: 1, // serialized for reliability; parallelism re-enabled if data gaps are due to parallelism
concurrency: 1, // serialized for reliability; parallelism re-enabled if data gaps are due to parallelism
subdivisionFactor,
})

Expand Down
Loading