{"record":{"id":"cc04bb1de666ea3f","repo":"coollabsio/coolify","slug":"no-subscription-and-team-id-found","errorCode":null,"errorMessage":"No subscription and team id found","messagePattern":"No subscription and team id found","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Jobs/StripeProcessJob.php","lineNumber":247,"sourceCode":"                    break;\n                case 'customer.subscription.updated':\n                    $teamId = data_get($data, 'metadata.team_id');\n                    $userId = data_get($data, 'metadata.user_id');\n                    $customerId = data_get($data, 'customer');\n                    $status = data_get($data, 'status');\n                    $subscriptionId = data_get($data, 'items.data.0.subscription') ?? data_get($data, 'id');\n                    $planId = data_get($data, 'items.data.0.plan.id') ?? data_get($data, 'plan.id');\n                    if (Str::contains($excludedPlans, $planId)) {\n                        // send_internal_notification('Subscription excluded.');\n                        break;\n                    }\n                    $subscription = Subscription::where('stripe_customer_id', $customerId)->first();\n                    if (! $subscription) {\n                        if ($status === 'incomplete_expired') {\n                            throw new \\RuntimeException('Subscription incomplete expired');\n                        }\n                        if (! $teamId) {\n                            throw new \\RuntimeException('No subscription and team id found');\n                        }\n                        $subscription = Subscription::firstOrCreate(\n                            ['team_id' => $teamId],\n                            [\n                                'stripe_subscription_id' => $subscriptionId,\n                                'stripe_customer_id' => $customerId,\n                                'stripe_invoice_paid' => false,\n                            ]\n                        );\n                    }\n                    $cancelAtPeriodEnd = data_get($data, 'cancel_at_period_end');\n                    $feedback = data_get($data, 'cancellation_details.feedback');\n                    $comment = data_get($data, 'cancellation_details.comment');\n                    $lookup_key = data_get($data, 'items.data.0.price.lookup_key');\n                    if (str($lookup_key)->contains('dynamic')) {\n                        $quantity = max(\n                            UpdateSubscriptionQuantity::MIN_SERVER_LIMIT,\n                            min((int) data_get($data, 'items.data.0.quantity', 2), UpdateSubscriptionQuantity::MAX_SERVER_LIMIT)","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Jobs/StripeProcessJob.php#L229-L265","documentation":"Error \"No subscription and team id found\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Jobs/StripeProcessJob.php:247 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"70b9acc42467278373e00de77abb40684e25b395","analyzedAt":"2026-08-17T01:41:01.313Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}