# Encontre o bug: Django > Um trecho de código. Encontre o bug, ou prove que não existe nenhum. Desafio diário: 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}) ``` ## Seu veredito - Falha de segurança - Bug de lógica - Estilo de código - Sem problema Uma tentativa por dia. A resposta aparece logo depois. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/pt/desafio-diario/django