feat: prisma DB multi-tenancy (cal.eu) #62241
Annotations
10 errors
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L16
PrismaClientKnownRequestError:
Invalid `prisma.user.create()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:16:36
13
14 beforeEach(async () => {
15 // Create test user
→ 16 const user = await prisma.user.create(
Unique constraint failed on the fields: (`email`)
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:6817
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:16:18
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { code: 'P2002', clientVersion: '5.4.2', meta: { target: [ 'email' ] }, batchRequestIdx: undefined }
|
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L54
PrismaClientInitializationError:
Invalid `prisma.booking.deleteMany()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:54:28
51 afterEach(async () => {
52 // Clean up test data in reverse order of creation
53 if (bookingId) {
→ 54 await prisma.booking.deleteMany(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:54:7
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L16
PrismaClientInitializationError:
Invalid `prisma.user.create()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:16:36
13
14 beforeEach(async () => {
15 // Create test user
→ 16 const user = await prisma.user.create(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:16:18
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L54
PrismaClientInitializationError:
Invalid `prisma.booking.deleteMany()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:54:28
51 afterEach(async () => {
52 // Clean up test data in reverse order of creation
53 if (bookingId) {
→ 54 await prisma.booking.deleteMany(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:54:7
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L16
PrismaClientInitializationError:
Invalid `prisma.user.create()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:16:36
13
14 beforeEach(async () => {
15 // Create test user
→ 16 const user = await prisma.user.create(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:16:18
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L54
PrismaClientInitializationError:
Invalid `prisma.booking.deleteMany()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:54:28
51 afterEach(async () => {
52 // Clean up test data in reverse order of creation
53 if (bookingId) {
→ 54 await prisma.booking.deleteMany(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:54:7
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/features/insights/__tests__/booking-denormalized.integration-test.ts#L37
PrismaClientInitializationError:
Invalid `prisma.booking.create()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/insights/__tests__/booking-denormalized.integration-test.ts:37:42
34 eventTypeId = eventType.id;
35
36 // Create test booking
→ 37 const booking = await prisma.booking.create(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/features/insights/__tests__/booking-denormalized.integration-test.ts:37:21
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/lib/server/getLuckyUser.integration-test.ts#L46
PrismaClientInitializationError:
Invalid `prisma.eventType.delete()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/lib/server/getLuckyUser.integration-test.ts:46:26
43 });
44
45 afterAll(async () => {
→ 46 await prisma.eventType.delete(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/lib/server/getLuckyUser.integration-test.ts:46:3
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/lib/server/getLuckyUser.integration-test.ts#L22
PrismaClientInitializationError:
Invalid `prisma.eventType.create()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/lib/server/getLuckyUser.integration-test.ts:22:40
19 }
20
21 beforeAll(async () => {
→ 22 const event = await prisma.eventType.create(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ packages/lib/server/getLuckyUser.integration-test.ts:22:17
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Run Tests:
packages/features/flags/features.repository.ts#L173
PrismaClientInitializationError:
Invalid `db.teamFeatures.findFirst()` invocation in
/home/runner/actions-runner/_work/***.com/***.com/packages/features/flags/features.repository.ts:173:52
170 async checkIfTeamHasFeature(teamId: number, featureId: keyof AppFlags): Promise<boolean> {
171 try {
172 // Early return if team has feature directly assigned
→ 173 const teamHasFeature = await db.teamFeatures.findFirst(
Error querying the database: FATAL: sorry, too many clients already
❯ Cn.handleRequestError node_modules/@prisma/client/runtime/library.js:123:7090
❯ Cn.handleAndLogRequestError node_modules/@prisma/client/runtime/library.js:123:6206
❯ Cn.request node_modules/@prisma/client/runtime/library.js:123:5926
❯ l node_modules/@prisma/client/runtime/library.js:128:9968
❯ FeaturesRepository.checkIfTeamHasFeature packages/features/flags/features.repository.ts:173:30
❯ packages/features/flags/features.repository.integration-test.ts:316:22
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { clientVersion: '5.4.2', errorCode: undefined }
|
Loading