Fix: Prevent activity tracker errors from blocking checkout
Problem: Activity tracker DNS errors (littleshop-admin:8080) were blocking checkout flow, preventing shipping address prompt from showing. Solution: Wrap activity tracking in try-catch with warning log. Checkout flow continues even if activity tracking fails. This ensures users can complete checkout even if analytics are unavailable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
17cb9c7721
commit
9e1bf0543f
@ -744,14 +744,21 @@ namespace TeleBot.Handlers
|
||||
return;
|
||||
}
|
||||
|
||||
// Track checkout initiation
|
||||
await _activityTracker.TrackActivityAsync(
|
||||
message.Chat,
|
||||
ActivityTypes.Checkout,
|
||||
$"Starting checkout with {session.Cart.Items.Count} items",
|
||||
null,
|
||||
session.Cart.GetTotalAmount()
|
||||
);
|
||||
// Track checkout initiation (non-blocking)
|
||||
try
|
||||
{
|
||||
await _activityTracker.TrackActivityAsync(
|
||||
message.Chat,
|
||||
ActivityTypes.Checkout,
|
||||
$"Starting checkout with {session.Cart.Items.Count} items",
|
||||
null,
|
||||
session.Cart.GetTotalAmount()
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning(ex, "Failed to track checkout activity - continuing anyway");
|
||||
}
|
||||
|
||||
// Initialize order flow
|
||||
session.OrderFlow = new OrderFlowData
|
||||
|
||||
Loading…
Reference in New Issue
Block a user