Skip to content

wip

038590e
Select commit
Loading
Failed to load commit list.
Open

Integrate trigger.dev functions for plaid and gocardless #297

wip
038590e
Select commit
Loading
Failed to load commit list.
Cursor / Cursor BugBot completed Jul 16, 2025 in 2m 12s

BugBot Review

BugBot Analysis Progress (2m 14s elapsed)

✅ Gathered PR context (1s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 2 potential bugs found (2m 8s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 2 bugs reported (2s)
✅ Analysis completed successfully (0s)

Final Result: BugBot completed review and found 2 potential issues

Request ID: serverGenReqId_e0739329-17aa-414e-afcc-74744b005584

Details

Bug: Prisma Query Error: Incorrect Relation Field Usage

The Prisma relation field BankConnection is incorrectly used in family.findMany queries. It should be bankConnections (camelCase, plural) to align with Prisma's naming conventions and the actual relation name, otherwise, it will cause runtime errors.

src/trigger/gocardless-tasks.ts#L743-L749

where: {
BankConnection: {
some: {
provider: "GOCARDLESS",
},
},
},

src/trigger/gocardless-tasks.ts#L793-L800

// Get all families with GoCardless connections
const familiesWithGoCardless = await prisma.family.findMany({
where: {
BankConnection: {
some: {
provider: "GOCARDLESS",
},
},

Fix in CursorFix in Web


Bug: Plaid API Client Environment Hardcoded

The Plaid API client is hardcoded to use PlaidEnvironments.sandbox. This prevents the application from connecting to the live Plaid API in production environments, as it will always connect to the sandbox regardless of the deployment stage. The Plaid environment should be configurable via environment variables.

src/trigger/plaid-tasks.ts#L14-L15

const configuration = new Configuration({
basePath: PlaidEnvironments.sandbox,

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎