From 9c5624a786bf64c22277ff590adb27c2e25e3ae4 Mon Sep 17 00:00:00 2001 From: chrislusf Date: Sat, 6 Dec 2025 12:07:30 -0800 Subject: fix: use StatusInternalServerError for mount/unmount errors Errors from manager.Mount and manager.Unmount can be due to internal server issues (filesystem errors, process start failures) not just bad client requests. --- cmd/seaweedfs-mount/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/seaweedfs-mount/main.go b/cmd/seaweedfs-mount/main.go index 12151e8..8d314e9 100644 --- a/cmd/seaweedfs-mount/main.go +++ b/cmd/seaweedfs-mount/main.go @@ -62,7 +62,7 @@ func main() { resp, err := manager.Mount(&req) if err != nil { - writeError(w, http.StatusBadRequest, err.Error()) + writeError(w, http.StatusInternalServerError, err.Error()) return } @@ -83,7 +83,7 @@ func main() { resp, err := manager.Unmount(&req) if err != nil { - writeError(w, http.StatusBadRequest, err.Error()) + writeError(w, http.StatusInternalServerError, err.Error()) return } -- cgit v1.2.3