music-assistant-server

Branch:dev-lidarr-plugin

Commit Details

Show why a Podcast Index login or episode lookup failed (#6146)

# What does this implement/fix?

When Podcast Index refuses a request (bad credentials, missing episode,
etc.) the error message only showed the HTTP status code. Users had no
way to tell what went wrong without asking for support.

The API helper now includes the response body in the error so the actual
reason is visible. Debug logging was also added so support can see what
happened from the log.

- API errors now quote the response body alongside the status code
- Long error bodies are trimmed to stay readable
- A 401 tells the user their credentials were rejected, with the reason
- Missing episodes and episodes without an audio URL are logged clearly
- Credentials are never included in logs or error messages

**Related issue (if applicable):**

## Types of changes

- [x] Bugfix (non-breaking change which fixes an issue) — `bugfix`
- [ ] New feature (non-breaking change which adds functionality) —
`new-feature`
- [ ] Enhancement to an existing feature — `enhancement`
- [ ] New music/player/metadata/plugin provider — `new-provider`
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as expected) — `breaking-change`
- [ ] Refactor (no behaviour change) — `refactor`
- [ ] Documentation only — `documentation`
- [ ] Maintenance / chore — `maintenance`
- [ ] CI / workflow change — `ci`
- [ ] Dependencies bump — `dependencies`

## Checklist

- [x] The code change is tested and works locally.
- [x] `pre-commit run --all-files` passes.
- [x] `pytest` passes, and tests have been added/updated under `tests/`
where applicable.
- [ ] For changes to shared models, the companion PR in
`music-assistant/models` is linked.
- [ ] For changes affecting the UI, the companion PR in
`music-assistant/frontend` is linked.
- [x] I have read and complied with the project's [AI
Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md)
for any AI-assisted contributions.
- [ ] I have [raised a PR against the documentation
repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md)
targeting the main or beta branch as appropriate.
Forgejo

Author

September 3, 2026 at 02:04 PM UTC

Committer

Marvin Schenkel<[email protected]>
September 4, 2026 at 07:55 AM UTC
251additions
45deletions
4files changed

Parent commits

Changes

4 files
+251-45

Changed Files (4)

music_assistant/providers/podcast_index/
tests/providers/podcast_index/
music_assistant/providers/podcast_index/constants.py
music_assistant/providers/podcast_index/helpers.py
+38-11
music_assistant/providers/podcast_index/provider.py
+31-34
tests/providers/podcast_index/test_api_errors.py
+182