Skip to content

fix: show bindings pages whose bindings have no Twitch category - #117

Merged
enimaloc merged 1 commit into
devfrom
fix/dashboard-null-category-box-art
Nov 13, 2026
Merged

enimaloc merged 1 commit into
devfrom
fix/dashboard-null-category-box-art

Conversation

@enimaloc

Copy link
Copy Markdown
Owner

Summary

A bindings page whose bindings all lack a Twitch category made /dashboard fail with a 500, which catapult-web shows as a 404.

ChannelDashboardAssembler.boxArts() returns Map.of() when no binding on the page has a Twitch category id, and callers then did boxArts.get(null): immutable maps throw a NullPointerException on a null key (the non-empty case is a HashMap, which accepts it, so only such pages broke). Seen live with page 2 holding a single INCOMPLETE binding without a category. The single-binding path (current binding) had the same pattern.

Fix: a small boxArt(map, id) helper returning no box art for a binding without a category, used at both call sites.

Tests

Two new tests in ChannelDashboardAssemblerTest reproduce the NPE (page with only uncategorised bindings; current binding without a category); the whole class passes (51 tests).

Modules to restart

catapult-api.

@enimaloc
enimaloc merged commit a792ead into dev Nov 13, 2026
5 checks passed
@enimaloc
enimaloc deleted the fix/dashboard-null-category-box-art branch November 13, 2026 19:55
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.

1 participant