diff options
| author | chrislusf <chris.lu@gmail.com> | 2025-12-06 12:07:30 -0800 |
|---|---|---|
| committer | Chris Lu <chrislusf@users.noreply.github.com> | 2025-12-06 18:53:22 -0800 |
| commit | 9c5624a786bf64c22277ff590adb27c2e25e3ae4 (patch) | |
| tree | a11dfc7c13371760b401d2bbad76ff1da1437eab /cmd | |
| parent | 70ad54f12e2e1bbf0a841b2604f150464fab1e8f (diff) | |
| download | seaweedfs-csi-driver-9c5624a786bf64c22277ff590adb27c2e25e3ae4.tar.xz seaweedfs-csi-driver-9c5624a786bf64c22277ff590adb27c2e25e3ae4.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.
Diffstat (limited to 'cmd')
| -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 } |
