forked from TrueCloudLab/frostfs-s3-gw
[#149] Removed grpc errors
Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
parent
57e2b70614
commit
63652d213c
3 changed files with 12 additions and 24 deletions
|
@ -8,7 +8,6 @@ import (
|
|||
"github.com/nspcc-dev/neofs-s3-gw/api"
|
||||
"github.com/nspcc-dev/neofs-s3-gw/api/layer"
|
||||
"go.uber.org/zap"
|
||||
"google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// DeleteObjectsRequest - xml carrying the object key names which needs to be deleted.
|
||||
|
@ -122,11 +121,6 @@ func (h *handler) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *http.Re
|
|||
code := "BadRequest"
|
||||
desc := err.Error()
|
||||
|
||||
if st, ok := status.FromError(err.Err); ok && st != nil {
|
||||
desc = st.Message()
|
||||
code = st.Code().String()
|
||||
}
|
||||
|
||||
response.Errors = append(response.Errors, DeleteError{
|
||||
Code: code,
|
||||
Message: desc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue