diff options
| author | Rohit Chormale <rohitchormale@gmail.com> | 2023-03-08 21:15:08 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-08 07:45:08 -0800 |
| commit | 59706c89fb3d2ab325a36ef237e147f99d6d259e (patch) | |
| tree | efaa3427719c13ddc630d9e30a843b4ce910c5cf | |
| parent | 7111c08289e9e6f673ae252c8e0fda1e86294390 (diff) | |
| download | seaweedfs-59706c89fb3d2ab325a36ef237e147f99d6d259e.tar.xz seaweedfs-59706c89fb3d2ab325a36ef237e147f99d6d259e.zip | |
#4270 set http status code to 409 if dir already exists (#4287)
| -rw-r--r-- | weed/server/filer_server_handlers_write_autochunk.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/server/filer_server_handlers_write_autochunk.go b/weed/server/filer_server_handlers_write_autochunk.go index 8b3fc45fb..6732db195 100644 --- a/weed/server/filer_server_handlers_write_autochunk.go +++ b/weed/server/filer_server_handlers_write_autochunk.go @@ -49,7 +49,7 @@ func (fs *FilerServer) autoChunk(ctx context.Context, w http.ResponseWriter, r * if err != nil { if strings.HasPrefix(err.Error(), "read input:") || err.Error() == io.ErrUnexpectedEOF.Error() { writeJsonError(w, r, 499, err) - } else if strings.HasSuffix(err.Error(), "is a file") { + } else if strings.HasSuffix(err.Error(), "is a file") || strings.HasSuffix(err.Error(), "already exists") { writeJsonError(w, r, http.StatusConflict, err) } else { writeJsonError(w, r, http.StatusInternalServerError, err) |
