Rohit Chormale
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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) |
|
|
|