# Spot the bug: Django > One snippet. Find the bug, or prove there isn't one. Daily challenge: 2026-08-19 (UTC) ยท Senior ```python import logging from django.http import JsonResponse from .models import Article logger = logging.getLogger(__name__) def get_article(request, slug): try: article = Article.objects.get(slug=slug) except Article.DoesNotExist: logger.error("Article not found: slug=%s", slug) return JsonResponse({"error": "Not found"}, status=404) return JsonResponse({"title": article.title, "body": article.body}) ``` ## Your verdict - Security flaw - Logic bug - Code style - No issue One attempt per day. The answer shows up right after. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/en/daily/django