Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

configOverride

Steven Tey14536242cd9b
diff --git a/apps/web/lib/api/utils/with-prisma-retry.ts b/apps/web/lib/api/utils/with-prisma-retry.ts
index 5b191754fe..29061ca3b1 100644
--- a/apps/web/lib/api/utils/with-prisma-retry.ts
+++ b/apps/web/lib/api/utils/with-prisma-retry.ts
@@ -21,8 +21,12 @@ const RETRIABLE_ERROR_CODES = new Set([
// Helper function for retrying operations
export async function withPrismaRetry<T>(
operation: () => Promise<T>,
- config = DEFAULT_CONFIG,
+ configOverride?: typeof DEFAULT_CONFIG,
): Promise<T> {
+ const config = {
+ ...DEFAULT_CONFIG,
+ ...configOverride,
+ };
let lastError: Error;
for (let attempt = 0; attempt <= config.maxRetries; attempt++) {