mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 03:53:34 +08:00
[volume] requests that were canceled by the client are not an internal server problem(500 => 499) (#5304)
This commit is contained in:

committed by
GitHub

parent
3d463ef471
commit
8fb978d6f6
@@ -50,7 +50,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)
|
||||
writeJsonError(w, r, util.HttpStatusCancelled, err)
|
||||
} else if strings.HasSuffix(err.Error(), "is a file") || strings.HasSuffix(err.Error(), "already exists") {
|
||||
writeJsonError(w, r, http.StatusConflict, err)
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user