quintodrome/server/nativeapi
Deluan b64d8ad334 fix(server): return 404 instead of 500 for non-existent playlists
The native API endpoints GET /playlist/{id}/tracks and
GET /playlist/{id}/tracks/{id} were panicking with a nil pointer
dereference (resulting in a 500) when the playlist did not exist.
This happened because Tracks() returns nil for missing playlists,
and the nil repository was passed directly to the rest handler.
Extracted a shared playlistTracksHandler that checks for nil and
returns 404 early. Added tests covering both the error and happy paths.
2026-02-15 22:39:27 -05:00
..
config.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
config_test.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
inspect.go feat: Multi-library support (#4181) 2025-07-18 18:41:12 -04:00
library.go fix: album statistics not updating after deleting missing files (#4668) 2025-11-08 20:11:00 -05:00
library_test.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
missing.go fix: album statistics not updating after deleting missing files (#4668) 2025-11-08 20:11:00 -05:00
native_api.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
native_api_song_test.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
native_api_suite_test.go Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
playlists.go fix(server): return 404 instead of 500 for non-existent playlists 2026-02-15 22:39:27 -05:00
playlists_test.go fix(server): return 404 instead of 500 for non-existent playlists 2026-02-15 22:39:27 -05:00
plugin.go feat(plugins): add JSONForms-based plugin configuration UI (#4911) 2026-01-19 20:51:00 -05:00
plugin_test.go feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
queue.go feat(server): add update and clear play queue endpoints to native API (#4215) 2025-06-11 12:02:31 -04:00
queue_test.go feat(server): add update and clear play queue endpoints to native API (#4215) 2025-06-11 12:02:31 -04:00
translations.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00
translations_test.go refactor: run Go modernize (#5002) 2026-02-08 09:57:30 -05:00