audiobookshelf/test/server
D. Rimron-Soutter b58ddaf9d3 fix: Handle duplicate series name error on rename instead of crashing
PATCH /api/series/:id with a name that already exists in the same library
causes an unhandled SequelizeUniqueConstraintError that crashes the server
process (exit code 1). Wrap the save() call in try/catch and return 400.

The included test "should return 400 when renaming to a name that already
exists in the same library" also serves as a minimal reproducer for the bug:
run it against the unpatched SeriesController and it throws the unhandled
SequelizeUniqueConstraintError (the same error seen in production as a fatal
unhandled rejection at SeriesController.js:83).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 14:01:38 +00:00
..
controllers fix: Handle duplicate series name error on rename instead of crashing 2026-03-11 14:01:38 +00:00
finders Improved subtitle parsing to account for bare colon in title 2026-02-06 14:31:09 -05:00
managers Merge pull request #3417 from nichwall/series_cleanup_2 2024-10-12 15:48:04 -05:00
migrations Improve book library page query performance for author sort order (#4080) 2025-03-17 17:09:49 -05:00
objects Fixes + add progress to m4b and embed tools 2024-07-20 12:28:06 +03:00
providers Add tests for cleanSeriesSequence 2024-03-14 19:37:51 +02:00
utils Improved subtitle parsing to account for bare colon in title 2026-02-06 14:31:09 -05:00
Logger.test.js Log non-strings into log file like console.log does 2024-09-11 19:58:30 +03:00