Skip to content

fix(indexers): fix crash when no Prowlarr instances configured#227

Merged
vavallee merged 1 commit into
mainfrom
fix/indexers-tab-crash-v2
Apr 18, 2026
Merged

fix(indexers): fix crash when no Prowlarr instances configured#227
vavallee merged 1 commit into
mainfrom
fix/indexers-tab-crash-v2

Conversation

@vavallee
Copy link
Copy Markdown
Owner

Fixes #225.

Go marshals a nil slice as null, so /api/v1/prowlarr returned null instead of [] for users without Prowlarr configured. React set prowlarrInstances to null, then prowlarrInstances.length threw when the Indexers tab rendered, crashing the whole app.

  • Backend: return [] when the slice is nil (same guard the Indexer handler already had)
  • Frontend: defensive ?? [] when setting state

Go marshals a nil slice as JSON null, so /api/v1/prowlarr returned null
instead of [] for users without Prowlarr. React set prowlarrInstances to
null, then prowlarrInstances.length threw when the Indexers tab rendered,
crashing the whole app (white screen).

Fixes #225
@vavallee vavallee merged commit 032611c into main Apr 18, 2026
11 checks passed
@vavallee vavallee deleted the fix/indexers-tab-crash-v2 branch April 18, 2026 02:03
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/api/prowlarr.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indexer tab does not work

1 participant