polishing

This commit is contained in:
Ben Sarmiento
2023-11-11 04:21:35 +01:00
parent aa6ce3662c
commit abf4183af5
4 changed files with 10 additions and 3 deletions

View File

@@ -39,6 +39,10 @@ func HandlePropfindRequest(w http.ResponseWriter, r *http.Request, t *torrent.To
}
if err != nil {
if strings.Contains(err.Error(), "cannot find") {
http.Error(w, "Not Found", http.StatusNotFound)
return
}
log.Errorf("Error processing request: %v", err)
http.Error(w, "Server error", http.StatusInternalServerError)
return