aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-07-12 17:41:38 -0500
committerJP Dillingham <jp@dillingham.me>2025-07-12 17:41:38 -0500
commit7f5ff0371bf920957096b18ce92a81992c0f3446 (patch)
tree464eee5cb1d71fce40a45c9f78d695f4432f48c0 /src
parent97a5431783e5f78be812baabadaaa65a4f15cd7d (diff)
downloadslskd-7f5ff0371bf920957096b18ce92a81992c0f3446.tar.gz
move catch block
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Search/SearchService.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/slskd/Search/SearchService.cs b/src/slskd/Search/SearchService.cs
index 53dec091..7d8fcf41 100644
--- a/src/slskd/Search/SearchService.cs
+++ b/src/slskd/Search/SearchService.cs
@@ -318,8 +318,9 @@ namespace slskd.Search
{
search.State = SearchStates.Completed | SearchStates.Cancelled;
}
+ catch (Exception ex)
{
- Log.Error(task.Exception, "Failed to execute search for '{Query}' (id: {Id}): {Message}", query, id, task.Exception?.Message ?? "Task completed in Faulted state, but there is no Exception");
+ Log.Error(ex, "Failed to execute search for '{Query}' (id: {Id}): {Message}", query, id, ex.Message);
search.State = SearchStates.Completed | SearchStates.Errored;
}