Skip to content

feat: Improve subscription workflow #73

feat: Improve subscription workflow

feat: Improve subscription workflow #73

Triggered via pull request February 24, 2026 02:24
Status Failure
Total duration 1m 45s
Artifacts

tests.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors
src/domain/services/subscriptions/create-subscription.spec.ts > create subscription > should not be able to generate a new subscription if user already has one: apps/backend/src/test/factories/make-subscription.ts#L25
Error: Failed query: insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" params: 41105c5b-0c25-43dd-b275-7dbead5e2434,e426d6dc-714a-49eb-93a5-da6f4900eef8,MEMBER,STRIPE,ACTIVE,a89562c9-8b1a-429f-a0e5-f93a2c711c5d ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ makeSubscription src/test/factories/make-subscription.ts:25:26 ❯ src/domain/services/subscriptions/create-subscription.spec.ts:29:5 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', params: [ '41105c5b-0c25-43dd-b275-7dbead5e2434', 'e426d6dc-714a-49eb-93a5-da6f4900eef8', 'MEMBER', 'STRIPE', 'ACTIVE', 'a89562c9-8b1a-429f-a0e5-f93a2c711c5d' ] } Caused by: Caused by: PostgresError: column "subscription_provider" of relation "subscriptions" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '55', file: 'parse_target.c', routine: 'checkInsertTargets', query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', parameters: [ '41105c5b-0c25-43dd-b275-7dbead5e2434', 'e426d6dc-714a-49eb-93a5-da6f4900eef8', 'MEMBER', 'STRIPE', 'ACTIVE', 'a89562c9-8b1a-429f-a0e5-f93a2c711c5d' ], args: [ '41105c5b-0c25-43dd-b275-7dbead5e2434', 'e426d6dc-714a-49eb-93a5-da6f4900eef8', 'MEMBER', 'STRIPE', 'ACTIVE', 'a89562c9-8b1a-429f-a0e5-f93a2c711c5d' ], types: [ +0, +0, +0, +0, +0, +0 ] }
src/domain/services/subscriptions/create-subscription.spec.ts > create subscription > should be able to create subscription: apps/backend/src/domain/services/subscriptions/create-subscription.ts#L17
Error: Failed query: select "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" from "subscriptions" "subscriptions" where ("subscriptions"."user_id" = $1 and "subscriptions"."status" = $2) limit $3 params: 107682cb-cd0b-42e0-8cca-e88e8c8d2700,ACTIVE,1 ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ createSubscription src/domain/services/subscriptions/create-subscription.ts:17:28 ❯ src/domain/services/subscriptions/create-subscription.spec.ts:13:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'select "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" from "subscriptions" "subscriptions" where ("subscriptions"."user_id" = $1 and "subscriptions"."status" = $2) limit $3', params: [ '107682cb-cd0b-42e0-8cca-e88e8c8d2700', 'ACTIVE', 1 ] } Caused by: Caused by: PostgresError: column "subscription_provider" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '33', file: 'parse_relation.c', routine: 'errorMissingColumn', query: 'select "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" from "subscriptions" "subscriptions" where ("subscriptions"."user_id" = $1 and "subscriptions"."status" = $2) limit $3', parameters: [ '107682cb-cd0b-42e0-8cca-e88e8c8d2700', 'ACTIVE', 1 ], args: [ '107682cb-cd0b-42e0-8cca-e88e8c8d2700', 'ACTIVE', 1 ], types: [ +0, +0, +0 ] }
src/domain/services/subscriptions/complete-subscription.spec.ts > complete subscription > should be able to complete subscription: apps/backend/src/infra/db/repositories/subscription-repository.ts#L89
Error: Failed query: select "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" from "subscriptions" where ("subscriptions"."user_id" = $1 and ("subscriptions"."status" = $2 or "subscriptions"."status" = $3)) order by "subscriptions"."created_at" desc limit $4 params: 7bb03e64-6f2c-4329-a7bb-9963a8d94f71,ACTIVE,PENDING_CANCELLATION,1 ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ getLastestActiveSubscription src/infra/db/repositories/subscription-repository.ts:89:26 ❯ getLastestActiveSubscription src/domain/services/subscriptions/get-subscription.ts:18:24 ❯ completeSubscription src/domain/services/subscriptions/complete-subscription.ts:19:20 ❯ src/domain/services/subscriptions/complete-subscription.spec.ts:10:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'select "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" from "subscriptions" where ("subscriptions"."user_id" = $1 and ("subscriptions"."status" = $2 or "subscriptions"."status" = $3)) order by "subscriptions"."created_at" desc limit $4', params: [ '7bb03e64-6f2c-4329-a7bb-9963a8d94f71', 'ACTIVE', 'PENDING_CANCELLATION', 1 ] } Caused by: Caused by: PostgresError: column "subscription_provider" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '33', file: 'parse_relation.c', routine: 'errorMissingColumn', query: 'select "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" from "subscriptions" where ("subscriptions"."user_id" = $1 and ("subscriptions"."status" = $2 or "subscriptions"."status" = $3)) order by "subscriptions"."created_at" desc limit $4', parameters: [ '7bb03e64-6f2c-4329-a7bb-9963a8d94f71', 'ACTIVE', 'PENDING_CANCELLATION', 1 ], args: [ '7bb03e64-6f2c-4329-a7bb-9963a8d94f71', 'ACTIVE', 'PENDING_CANCELLATION', 1 ], types: [ +0, +0, +0, +0 ] }
src/domain/services/subscriptions/cancel-subscription.spec.ts > Cancel subscription > should still update DB when provider says subscription already canceled (idempotent): apps/backend/src/test/factories/make-subscription.ts#L25
Error: Failed query: insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" params: 981f55c0-7ae3-4175-89b8-bb9753b0a1f3,a938fb94-c73c-4c1f-b931-fc7ab5d36a69,MEMBER,STRIPE,ACTIVE,sub_d76c58febfe846f7ae3ce5516a6969bb ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ Module.makeSubscription src/test/factories/make-subscription.ts:25:26 ❯ src/domain/services/subscriptions/cancel-subscription.spec.ts:116:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', params: [ '981f55c0-7ae3-4175-89b8-bb9753b0a1f3', 'a938fb94-c73c-4c1f-b931-fc7ab5d36a69', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_d76c58febfe846f7ae3ce5516a6969bb' ] } Caused by: Caused by: PostgresError: column "subscription_provider" of relation "subscriptions" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '55', file: 'parse_target.c', routine: 'checkInsertTargets', query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', parameters: [ '981f55c0-7ae3-4175-89b8-bb9753b0a1f3', 'a938fb94-c73c-4c1f-b931-fc7ab5d36a69', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_d76c58febfe846f7ae3ce5516a6969bb' ], args: [ '981f55c0-7ae3-4175-89b8-bb9753b0a1f3', 'a938fb94-c73c-4c1f-b931-fc7ab5d36a69', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_d76c58febfe846f7ae3ce5516a6969bb' ], types: [ +0, +0, +0, +0, +0, +0 ] }
src/domain/services/subscriptions/cancel-subscription.spec.ts > Cancel subscription > should throw when subscription has no provider subscription id: apps/backend/src/test/factories/make-subscription.ts#L25
Error: Failed query: insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" params: 8684e199-7b5d-414f-a2f8-28af3a913a76,b0c9284d-fce7-4aa1-a06c-8337688a489a,MEMBER,STRIPE,ACTIVE, ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ Module.makeSubscription src/test/factories/make-subscription.ts:25:26 ❯ src/domain/services/subscriptions/cancel-subscription.spec.ts:94:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', params: [ '8684e199-7b5d-414f-a2f8-28af3a913a76', 'b0c9284d-fce7-4aa1-a06c-8337688a489a', 'MEMBER', 'STRIPE', 'ACTIVE', null ] } Caused by: Caused by: PostgresError: column "subscription_provider" of relation "subscriptions" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '55', file: 'parse_target.c', routine: 'checkInsertTargets', query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', parameters: [ '8684e199-7b5d-414f-a2f8-28af3a913a76', 'b0c9284d-fce7-4aa1-a06c-8337688a489a', 'MEMBER', 'STRIPE', 'ACTIVE', null ], args: [ '8684e199-7b5d-414f-a2f8-28af3a913a76', 'b0c9284d-fce7-4aa1-a06c-8337688a489a', 'MEMBER', 'STRIPE', 'ACTIVE', null ], types: [ +0, +0, +0, +0, +0, +0 ] }
src/domain/services/subscriptions/cancel-subscription.spec.ts > Cancel subscription > should update user subscription status after cancel: apps/backend/src/test/factories/make-subscription.ts#L25
Error: Failed query: insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" params: 9f5598d6-9a28-41ed-b57a-6582d5a84164,12a7a408-2c4f-44f2-b4ff-f192c97eafc7,MEMBER,STRIPE,ACTIVE,sub_8a04b8dc2fac4fb891a44e1b706cc081 ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ Module.makeSubscription src/test/factories/make-subscription.ts:25:26 ❯ src/domain/services/subscriptions/cancel-subscription.spec.ts:70:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', params: [ '9f5598d6-9a28-41ed-b57a-6582d5a84164', '12a7a408-2c4f-44f2-b4ff-f192c97eafc7', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_8a04b8dc2fac4fb891a44e1b706cc081' ] } Caused by: Caused by: PostgresError: column "subscription_provider" of relation "subscriptions" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '55', file: 'parse_target.c', routine: 'checkInsertTargets', query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', parameters: [ '9f5598d6-9a28-41ed-b57a-6582d5a84164', '12a7a408-2c4f-44f2-b4ff-f192c97eafc7', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_8a04b8dc2fac4fb891a44e1b706cc081' ], args: [ '9f5598d6-9a28-41ed-b57a-6582d5a84164', '12a7a408-2c4f-44f2-b4ff-f192c97eafc7', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_8a04b8dc2fac4fb891a44e1b706cc081' ], types: [ +0, +0, +0, +0, +0, +0 ] }
src/domain/services/subscriptions/cancel-subscription.spec.ts > Cancel subscription > should cancel the subscription: apps/backend/src/test/factories/make-subscription.ts#L25
Error: Failed query: insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id" params: 7109fee5-3bec-4a53-a7c6-b27e0a121f7f,ef806d1a-32eb-4156-a49a-e8aafd5b0829,MEMBER,STRIPE,ACTIVE,sub_b230f8814cb641169072d9a0b664626a ❯ PostgresJsPreparedQuery.queryWithCache ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/pg-core/session.js:41:15 ❯ ../../node_modules/.pnpm/drizzle-orm@0.45.1_@opentelemetry+api@1.9.0_postgres@3.4.8/node_modules/drizzle-orm/postgres-js/session.js:37:20 ❯ Module.makeSubscription src/test/factories/make-subscription.ts:25:26 ❯ src/domain/services/subscriptions/cancel-subscription.spec.ts:37:26 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', params: [ '7109fee5-3bec-4a53-a7c6-b27e0a121f7f', 'ef806d1a-32eb-4156-a49a-e8aafd5b0829', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_b230f8814cb641169072d9a0b664626a' ] } Caused by: Caused by: PostgresError: column "subscription_provider" of relation "subscriptions" does not exist ❯ ErrorResponse ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:815:30 ❯ handle ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:489:6 ❯ Socket.data ../../node_modules/.pnpm/postgres@3.4.8/node_modules/postgres/src/connection.js:324:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { severity_local: 'ERROR', severity: 'ERROR', code: '42703', position: '55', file: 'parse_target.c', routine: 'checkInsertTargets', query: 'insert into "subscriptions" ("id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id") values ($1, $2, $3, $4, $5, default, default, default, $6) returning "id", "user_id", "type", "subscription_provider", "status", "created_at", "canceled_at", "cancellation_reason", "provider_subscription_id"', parameters: [ '7109fee5-3bec-4a53-a7c6-b27e0a121f7f', 'ef806d1a-32eb-4156-a49a-e8aafd5b0829', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_b230f8814cb641169072d9a0b664626a' ], args: [ '7109fee5-3bec-4a53-a7c6-b27e0a121f7f', 'ef806d1a-32eb-4156-a49a-e8aafd5b0829', 'MEMBER', 'STRIPE', 'ACTIVE', 'sub_b230f8814cb641169072d9a0b664626a' ], types: [ +0, +0, +0, +0, +0, +0 ] }
src/domain/services/imports/publish-import-to-queue.spec.ts > publishToQueue > should publish movies and series to their queues: apps/backend/src/domain/services/imports/publish-import-to-queue.spec.ts#L32
AssertionError: expected "vi.fn()" to be called 2 times, but got 0 times ❯ src/domain/services/imports/publish-import-to-queue.spec.ts:32:27
Unhandled error: apps/backend/src/infra/adapters/sqs.ts#L72
QueueDoesNotExist: The specified queue does not exist. ❯ AwsJson1_0Protocol.handleError ../../node_modules/.pnpm/@aws-sdk+core@3.973.5/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js:773:27 ❯ AwsJson1_0Protocol.deserializeResponse ../../node_modules/.pnpm/@smithy+core@3.22.0/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js:481:13 ❯ ../../node_modules/.pnpm/@smithy+core@3.22.0/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js:26:24 ❯ ../../node_modules/.pnpm/@smithy+core@3.22.0/node_modules/@smithy/core/dist-cjs/index.js:121:20 ❯ ../../node_modules/.pnpm/@smithy+middleware-retry@4.4.29/node_modules/@smithy/middleware-retry/dist-cjs/index.js:254:46 ❯ ../../node_modules/.pnpm/@aws-sdk+middleware-sdk-sqs@3.972.5/node_modules/@aws-sdk/middleware-sdk-sqs/dist-cjs/index.js:113:18 ❯ ../../node_modules/.pnpm/@aws-sdk+middleware-logger@3.972.3/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:5:26 ❯ publish src/infra/adapters/sqs.ts:72:48 ❯ processAndPublish src/domain/services/imports/publish-import-to-queue.ts:40:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { '$fault': 'client', '$response': { statusCode: 400, reason: 'BAD REQUEST', headers: { server: 'TwistedWeb/25.5.0', date: 'Tue, 24 Feb 2026 02:25:48 GMT', 'content-type': 'application/json', 'x-amzn-errortype': 'QueueDoesNotExist', 'content-length': '81', 'x-amzn-query-error': 'AWS.SimpleQueueService.NonExistentQueue;Sender', 'x-amzn-requestid': 'db281a95-ff72-4127-8c1c-a1567cbc032d', 'x-localstack': 'true' }, body: { _events: { close: undefined, error: 'Function<anonymous>', data: undefined, end: 'Function<responseOnEnd>', readable: undefined }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: true, endEmitted: true, reading: false, constructed: true, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, closed: true, closeEmitted: true, multiAwaitDrain: false, readingMore: true, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: false, pipesCount: +0, paused: true }, _maxListeners: undefined, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [ 'Server', 'TwistedWeb/25.5.0', 'Date', 'Tue, 24 Feb 2026 02:25:48 GMT', 'Content-Type', 'application/json', 'X-Amzn-Errortype', 'QueueDoesNotExist', 'Content-Length', '81', 'x-amzn-query-error', 'AWS.SimpleQueueService.NonExistentQueue;Sender', 'x-amzn-RequestId', 'db281a95-ff72-4127-8c1c-a1567cbc032d', 'x-localstack', 'true' ], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'BAD REQUEST', client: { connecting: false, _hadError: false, _parent: null, _host: 'localhost', _closeAfterHandlingError: false, _events: { close: 'Function<onClose>', error: 'Function<bound onceWrapper>', prefinish: undefined, finish: undefined, drain: undefined, data: undefined, end: 'Function<onReadableStreamEnd>', readable: undefined, connect: undefined, free: 'Function<onFree>', timeout: 'Function<onTimeout>', agentRemove: 'Function<onRemove>' }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: false, endEmitted: false, reading: true, constructed: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: false, autoDestroy: true, destroyed: false, closed: false, closeEmitted: false, multiAwaitDrain: false, readingMore: false, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: true, pipesCount: +0, paused
Unhandled error: apps/backend/src/infra/adapters/sqs.ts#L72
QueueDoesNotExist: The specified queue does not exist. ❯ AwsJson1_0Protocol.handleError ../../node_modules/.pnpm/@aws-sdk+core@3.973.5/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js:773:27 ❯ AwsJson1_0Protocol.deserializeResponse ../../node_modules/.pnpm/@smithy+core@3.22.0/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js:481:13 ❯ ../../node_modules/.pnpm/@smithy+core@3.22.0/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js:26:24 ❯ ../../node_modules/.pnpm/@smithy+core@3.22.0/node_modules/@smithy/core/dist-cjs/index.js:121:20 ❯ ../../node_modules/.pnpm/@smithy+middleware-retry@4.4.29/node_modules/@smithy/middleware-retry/dist-cjs/index.js:254:46 ❯ ../../node_modules/.pnpm/@aws-sdk+middleware-sdk-sqs@3.972.5/node_modules/@aws-sdk/middleware-sdk-sqs/dist-cjs/index.js:113:18 ❯ ../../node_modules/.pnpm/@aws-sdk+middleware-logger@3.972.3/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js:5:26 ❯ publish src/infra/adapters/sqs.ts:72:48 ❯ processAndPublish src/domain/services/imports/publish-import-to-queue.ts:40:3 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { '$fault': 'client', '$response': { statusCode: 400, reason: 'BAD REQUEST', headers: { server: 'TwistedWeb/25.5.0', date: 'Tue, 24 Feb 2026 02:25:48 GMT', 'content-type': 'application/json', 'x-amzn-errortype': 'QueueDoesNotExist', 'content-length': '81', 'x-amzn-query-error': 'AWS.SimpleQueueService.NonExistentQueue;Sender', 'x-amzn-requestid': '9dfc14b0-ae43-4729-b50b-7c1671d29e39', 'x-localstack': 'true' }, body: { _events: { close: undefined, error: 'Function<anonymous>', data: undefined, end: 'Function<responseOnEnd>', readable: undefined }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: true, endEmitted: true, reading: false, constructed: true, sync: true, needReadable: false, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: true, autoDestroy: true, destroyed: true, closed: true, closeEmitted: true, multiAwaitDrain: false, readingMore: true, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: false, pipesCount: +0, paused: true }, _maxListeners: undefined, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [ 'Server', 'TwistedWeb/25.5.0', 'Date', 'Tue, 24 Feb 2026 02:25:48 GMT', 'Content-Type', 'application/json', 'X-Amzn-Errortype', 'QueueDoesNotExist', 'Content-Length', '81', 'x-amzn-query-error', 'AWS.SimpleQueueService.NonExistentQueue;Sender', 'x-amzn-RequestId', '9dfc14b0-ae43-4729-b50b-7c1671d29e39', 'x-localstack', 'true' ], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 400, statusMessage: 'BAD REQUEST', client: { connecting: false, _hadError: false, _parent: null, _host: 'localhost', _closeAfterHandlingError: false, _events: { close: 'Function<onClose>', error: 'Function<bound onceWrapper>', prefinish: undefined, finish: undefined, drain: undefined, data: undefined, end: 'Function<onReadableStreamEnd>', readable: undefined, connect: undefined, free: 'Function<onFree>', timeout: 'Function<onTimeout>', agentRemove: 'Function<onRemove>' }, _readableState: { highWaterMark: 65536, buffer: [], bufferIndex: +0, length: +0, pipes: [], awaitDrainWriters: null, constructor: 'Function<ReadableState>', objectMode: false, ended: false, endEmitted: false, reading: true, constructed: true, sync: false, needReadable: true, emittedReadable: false, readableListening: false, resumeScheduled: false, errorEmitted: false, emitClose: false, autoDestroy: true, destroyed: false, closed: false, closeEmitted: false, multiAwaitDrain: false, readingMore: false, dataEmitted: true, errored: null, defaultEncoding: 'utf8', decoder: null, encoding: null, flowing: true, pipesCount: +0, paused