mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-04 18:09:12 +03:00
[PR #10956] Fix InvalidOperationException if log file not found #12675
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/10956
State: closed
Merged: Yes
Changes
API route
System/Logs/Logcurrently throws an InvalidOperationException and returns a 500 if the requested log file does not exist.I updated this method to handle this edge case and reutrn a 404.
I also added unit tests to check that NotFound is returned if the file does not exist. I was going to add more unit tests for this method, but testing it is slightly difficult due to the lack of abstraction and using FileStream directly.
Issues
None