{"record":{"id":"0a178591cdbeed14","repo":"coollabsio/coolify","slug":"no-team-found-in-coolify-for-customer-customeri","errorCode":null,"errorMessage":"No team found in Coolify for customer: {$customerId}","messagePattern":"No team found in Coolify for customer: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"app/Jobs/StripeProcessJob.php","lineNumber":163,"sourceCode":"                    } else {\n                        VerifyStripeSubscriptionStatusJob::dispatch($subscription)\n                            ->delay(now()->addSeconds(20));\n                    }\n                    break;\n                case 'invoice.payment_failed':\n                    $customerId = data_get($data, 'customer');\n                    $invoiceId = data_get($data, 'id');\n                    $paymentIntentId = data_get($data, 'payment_intent');\n\n                    $subscription = Subscription::where('stripe_customer_id', $customerId)->first();\n                    if (! $subscription) {\n                        // send_internal_notification('invoice.payment_failed failed but no subscription found in Coolify for customer: '.$customerId);\n                        break;\n                    }\n                    $team = data_get($subscription, 'team');\n                    if (! $team) {\n                        // send_internal_notification('invoice.payment_failed failed but no team found in Coolify for customer: '.$customerId);\n                        throw new \\RuntimeException(\"No team found in Coolify for customer: {$customerId}\");\n                    }\n\n                    // Verify payment status with Stripe API before sending failure notification\n                    if ($paymentIntentId) {\n                        try {\n                            $stripe = app(StripeClient::class);\n                            $paymentIntent = $stripe->paymentIntents->retrieve($paymentIntentId);\n\n                            if (in_array($paymentIntent->status, ['processing', 'succeeded', 'requires_action', 'requires_confirmation'])) {\n                                break;\n                            }\n\n                            if (! $subscription->stripe_invoice_paid && $subscription->created_at->diffInMinutes(now()) < 5) {\n                                SubscriptionInvoiceFailedJob::dispatch($team)->delay(now()->addSeconds(60));\n                                break;\n                            }\n                        } catch (\\Exception $e) {\n                        }","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/coollabsio/coolify/blob/70b9acc42467278373e00de77abb40684e25b395/app/Jobs/StripeProcessJob.php#L145-L181","documentation":"Error \"No team found in Coolify for customer: {$customerId}\" thrown in coollabsio/coolify.","triggerScenarios":"Thrown at app/Jobs/StripeProcessJob.php:163 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"}