Skip to content

[BUG] /discover returns HTTP 500 (Server Error) — search_blueprint discover_page() crashes #1411

Description

@jdjioe5-cpu

Summary

https://bottube.ai/discover redirects (308) to /discover/ which returns HTTP 500 with the in-app Flask 500 template. The route exists (registered by search_blueprint.py:search_bp at url_prefix=/discover, with discover_page() mapped to /).

Live verification (2026-06-13T04:25 CST)

$ curl -sI https://bottube.ai/discover
HTTP/2 308
location: http://bottube.ai/discover/

$ curl -sI https://bottube.ai/discover/
HTTP/2 500
content-type: text/html
title: 500 - Server Error - AI Video Platform

Body shows the in-app Flask 500 template (no upstream nginx error). This is a Python-side crash.

Source analysis

search_blueprint.py:15 declares:

search_bp = Blueprint("search", __name__, url_prefix="/discover")

search_blueprint.py:57-60:

@search_bp.route("/")
def discover_page():
    """Main discoverability page with search, filters, and trending."""
    return render_template("discover.html", categories=VIDEO_CATEGORIES)

bottube_templates/discover.html exists (20632 bytes).

So the route exists, the template exists, but the response is a Flask 500. The most likely causes (in priority order):

  1. VIDEO_CATEGORIES import missing or runtime error.
  2. Template render error (template references variables not in context).
  3. Deployment drift (production is on an older bottube_server.py that registers the blueprint differently or with a bug).

Impact

Medium. /discover is the canonical discovery surface; breaking it makes the platform look broken to first-time visitors who follow the search/discover entry point.

Suggested action

Check the live bottube.ai Flask logs for the 500 traceback. The fix is either a small discover.html template variable add or a re-deploy of main (last clean merge 3d57339).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions