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,7 +744,9 @@ namespace TeleBot.Handlers
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Track checkout initiation
|
// Track checkout initiation (non-blocking)
|
||||||
|
try
|
||||||
|
{
|
||||||
await _activityTracker.TrackActivityAsync(
|
await _activityTracker.TrackActivityAsync(
|
||||||
message.Chat,
|
message.Chat,
|
||||||
ActivityTypes.Checkout,
|
ActivityTypes.Checkout,
|
||||||
@ -752,6 +754,11 @@ namespace TeleBot.Handlers
|
|||||||
null,
|
null,
|
||||||
session.Cart.GetTotalAmount()
|
session.Cart.GetTotalAmount()
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogWarning(ex, "Failed to track checkout activity - continuing anyway");
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize order flow
|
// Initialize order flow
|
||||||
session.OrderFlow = new OrderFlowData
|
session.OrderFlow = new OrderFlowData
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user