mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-21 10:18:21 -05:00
fix: update reva to fix status codes
This commit is contained in:
Generated
Vendored
+1
-1
@@ -709,7 +709,7 @@ func (s *svc) Move(ctx context.Context, req *provider.MoveRequest) (*provider.Mo
|
||||
|
||||
if sourceProviderInfo.Address != destProviderInfo.Address {
|
||||
return &provider.MoveResponse{
|
||||
Status: status.NewUnimplemented(ctx, nil, "gateway does not support cross storage move, use copy and delete"),
|
||||
Status: status.NewPermissionDenied(ctx, nil, "cross storage moves are not permitted, use copy and delete"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -666,7 +666,7 @@ func (s *service) Move(ctx context.Context, req *provider.MoveRequest) (*provide
|
||||
|
||||
if dstReceivedShare.Share.Id.OpaqueId != srcReceivedShare.Share.Id.OpaqueId {
|
||||
return &provider.MoveResponse{
|
||||
Status: status.NewUnimplemented(ctx, nil, "sharesstorageprovider: can not move between shares"),
|
||||
Status: status.NewPermissionDenied(ctx, nil, "cross storage moves are not permitted, use copy and delete"),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -281,6 +281,8 @@ func (s *svc) handleMove(ctx context.Context, w http.ResponseWriter, r *http.Req
|
||||
switch mRes.Status.Code {
|
||||
case rpc.Code_CODE_ABORTED:
|
||||
status = http.StatusPreconditionFailed
|
||||
case rpc.Code_CODE_PERMISSION_DENIED:
|
||||
status = http.StatusForbidden
|
||||
case rpc.Code_CODE_UNIMPLEMENTED:
|
||||
// We translate this into a Bad Gateway error as per https://www.rfc-editor.org/rfc/rfc4918#section-9.9.4
|
||||
// > 502 (Bad Gateway) - This may occur when the destination is on another
|
||||
|
||||
Reference in New Issue
Block a user