diff options
| author | zuzuviewer <750938164@qq.com> | 2024-03-21 23:43:54 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-21 08:43:54 -0700 |
| commit | 211171e6695b492021375e6e8af3cb7e1337a65c (patch) | |
| tree | af159047b62b3a473a09ecc216027e9846fd12b5 /weed/iamapi | |
| parent | 25643cfbc6fdde5a73725b557fd2d6ae8e66484f (diff) | |
| download | seaweedfs-211171e6695b492021375e6e8af3cb7e1337a65c.tar.xz seaweedfs-211171e6695b492021375e6e8af3cb7e1337a65c.zip | |
Fix iam service response 500 (#5405)
Diffstat (limited to 'weed/iamapi')
| -rw-r--r-- | weed/iamapi/iamapi_management_handlers.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/iamapi/iamapi_management_handlers.go b/weed/iamapi/iamapi_management_handlers.go index be9e4f874..d63bc8849 100644 --- a/weed/iamapi/iamapi_management_handlers.go +++ b/weed/iamapi/iamapi_management_handlers.go @@ -3,6 +3,7 @@ package iamapi import ( "crypto/sha1" "encoding/json" + "errors" "fmt" "math/rand" "net/http" @@ -13,6 +14,7 @@ import ( "time" "github.com/seaweedfs/seaweedfs/weed/glog" + "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" "github.com/seaweedfs/seaweedfs/weed/pb/iam_pb" "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" "github.com/seaweedfs/seaweedfs/weed/s3api/s3err" @@ -424,7 +426,7 @@ func (iama *IamApiServer) DoActions(w http.ResponseWriter, r *http.Request) { } values := r.PostForm s3cfg := &iam_pb.S3ApiConfiguration{} - if err := iama.s3ApiConfig.GetS3ApiConfiguration(s3cfg); err != nil { + if err := iama.s3ApiConfig.GetS3ApiConfiguration(s3cfg); err != nil && !errors.Is(err, filer_pb.ErrNotFound) { s3err.WriteErrorResponse(w, r, s3err.ErrInternalError) return } |
