diff --git a/myproject/pos/views.py b/myproject/pos/views.py index 4f4d254..0450634 100644 --- a/myproject/pos/views.py +++ b/myproject/pos/views.py @@ -1532,8 +1532,10 @@ def pos_checkout(request): }) except (Customer.DoesNotExist, Warehouse.DoesNotExist, Product.DoesNotExist, ProductKit.DoesNotExist) as e: + logger.error(f'POS Checkout: объект не найден: {str(e)}') return JsonResponse({'success': False, 'error': 'Объект не найден'}, status=404) except ValidationError as e: + logger.error(f'POS Checkout: ошибка валидации: {str(e)}', exc_info=True) return JsonResponse({'success': False, 'error': str(e)}, status=400) except json.JSONDecodeError: return JsonResponse({'success': False, 'error': 'Неверный формат JSON'}, status=400)