diff options
| author | chrislusf <chris.lu@gmail.com> | 2025-12-06 12:07:30 -0800 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2025-12-06 12:07:30 -0800 |
| commit | 2e1ce39bd8c1a26af59863d7018029b13541f30b (patch) | |
| tree | a11dfc7c13371760b401d2bbad76ff1da1437eab | |
| parent | 94d9de621bab669a75bb0f78415f1c570c2c3bfa (diff) | |
| download | seaweedfs-csi-driver-2e1ce39bd8c1a26af59863d7018029b13541f30b.tar.xz seaweedfs-csi-driver-2e1ce39bd8c1a26af59863d7018029b13541f30b.zip | |
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.
| -rw-r--r-- | cmd/seaweedfs-mount/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
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 } |
