Skip to content

Creating an episode or speaker profile with an existing name returns 500 #1451

Open

Description

@lfnovo

Found by the pre-release smoke test (2026-10-04).

Problem

POST /api/episode-profiles and POST /api/speaker-profiles with a name that already exists return 500 (Failed to create episode profile). The unique indexes idx_episode_profile_name / idx_speaker_profile_name (migration 7) reject the insert, and the routers turn it into a generic 500. The client can't tell "name taken" from a server failure, and the UI shows a generic error.

API log:

Failed to create episode profile: Database index `idx_episode_profile_name` already contains 'smoke_portuguese', with record `episode_profile:...`
POST /api/episode-profiles HTTP/1.1" 500

Expected outcome

  • Both create endpoints (and update, when renaming onto an existing name) return 409 (or 400) with a clear message, e.g. An episode profile named 'X' already exists. Prefer a typed exception from open_notebook.exceptions over a bare HTTPException.
  • The profile form shows that message.

Acceptance criteria

  • API tests: a duplicate name on create (and rename) returns 409/400 with the message, for episode and speaker profiles.
  • pytest, ruff, mypy green.

Activity

  1. added
    bugSomething isn't working
    readyApproved and ready to be worked on
    area: podcastPodcast and audio features
    on Oct 4, 2026
  2. VirenSumbly commented on Oct 4, 2026

    @VirenSumbly

    Hi! I’d like to work on this issue. I can add the API tests for duplicate names on create/rename and implement the appropriate 409/400 handling for both episode and speaker profiles.

    Could you assign this issue to me? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: podcastPodcast and audio featuresbugSomething isn't workinggood first issueGood for newcomersreadyApproved and ready to be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions