dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Dashboard gives a generic error message when duplicate bucket is created in multi-cloud

Open asifdxtreme opened this issue 3 years ago • 2 comments

Issue/Feature Description: Dashboard gives a generic error message while creating bucket with the exisiting bucket name.

Why this issue to fixed / feature is needed(give scenarios or use cases): Error seems to be generic and confuses the user to believe something is wrong with the configuration.

How to reproduce, in case of a bug: Create a mult-cloud bucket with the same name which exisit already in cloud.

asifdxtreme avatar Apr 02 '21 06:04 asifdxtreme

A follow up PR can be raised in multi-cloud if it need changes in the backend

asifdxtreme avatar Apr 02 '21 06:04 asifdxtreme

@asifdxtreme I checked this and see that the dashboard receives a generic error from the API, which is shown to the user.

image image

The logs from the S3 container show that the cloud returns an error 409 as the bucket name was already present on the cloud.

[2021-04-09T08:55:10+05:30] [ERROR] [/root/gopath/src/github.com/sodafoundation/multi-cloud/s3/pkg/datastore/aws/aws.go] [aws.(*AwsAdapter).BucketCreate():77] [PID:8] the create bucket failed in aws-s3 service with err:%sBucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
	status code: 409, request id: 56R6N8R9QXAJB7SJ, host id: gmN8PFktES89VnRnM2jnFSw0DuSvP5yDtY2CbjZUN6Qd6HF2yL+wL0rQLhwrDZBvF/6dWAluA4Q=

image

If this error can be send through in the API response then we can display the same.

anvithks avatar Apr 09 '21 03:04 anvithks