1 parent 6146bf4 commit 688b19eCopy full SHA for 688b19e
1 file changed
src/backend/base/langflow/services/paddle/subscriptions.py
@@ -5,6 +5,7 @@
5
import asyncio
6
from dataclasses import dataclass
7
from datetime import datetime
8
+from http import HTTPStatus
9
import re
10
from typing import Any, Literal
11
@@ -88,7 +89,9 @@ async def _create_paddle_customer_and_update_clerk_metadata(
88
89
)
90
logger.info(f"Paddle customer creation response: {customer}")
91
except Exception as exc: # noqa: BLE001
- customer_id = _extract_customer_id_from_error(exc)
92
+ customer_id = None
93
+ if hasattr(exc, 'status_code') and exc.status_code == HTTPStatus.CONFLICT:
94
+ customer_id = _extract_customer_id_from_error(exc)
95
96
if not customer_id:
97
if not _is_customer_already_exists_error(exc):
0 commit comments