Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 28 for toAPIError (0.2 sec)

  1. cmd/bucket-encryption-handlers.go

    		if err != nil {
    			if errors.Is(err, kes.ErrKeyNotFound) {
    				writeErrorResponse(ctx, w, toAPIError(ctx, errKMSKeyNotFound), r.URL)
    				return
    			}
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	configData, err := xml.Marshal(encConfig)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  2. cmd/admin-bucket-handlers.go

    		writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	if err := globalBucketTargetSys.RemoveTarget(ctx, bucket, arn); err != nil {
    		writeErrorResponseJSON(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    	targets, err := globalBucketTargetSys.ListBucketTargets(ctx, bucket)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  3. cmd/object-multipart-handlers.go

    	if crypto.Requested(r.Header) {
    		if crypto.SSECopy.IsRequested(r.Header) {
    			writeErrorResponse(ctx, w, toAPIError(ctx, errInvalidEncryptionParameters), r.URL)
    			return
    		}
    
    		if crypto.SSEC.IsRequested(r.Header) && crypto.S3.IsRequested(r.Header) {
    			writeErrorResponse(ctx, w, toAPIError(ctx, crypto.ErrIncompatibleEncryptionMethod), r.URL)
    			return
    		}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  4. cmd/acl-handlers.go

    					r.URL)
    				return
    			}
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    
    		if len(acl.AccessControlList.Grants) == 0 {
    			writeErrorResponse(ctx, w, toAPIError(ctx, NotImplemented{}), r.URL)
    			return
    		}
    
    		if acl.AccessControlList.Grants[0].Permission != "FULL_CONTROL" {
    			writeErrorResponse(ctx, w, toAPIError(ctx, NotImplemented{}), r.URL)
    			return
    		}
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 8.4K bytes
    - Viewed (0)
  5. cmd/object-handlers.go

    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	opts, err := delOpts(ctx, r, bucket, object)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	rcfg, _ := globalBucketObjectLockSys.Get(bucket)
    	if rcfg.LockEnabled && opts.DeletePrefix {
    		apiErr := toAPIError(ctx, errInvalidArgument)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 20:15:54 GMT 2024
    - 125.2K bytes
    - Viewed (0)
  6. cmd/bucket-policy-handlers.go

    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	// Read bucket access policy.
    	config, err := globalPolicySys.Get(bucket)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	configData, err := json.Marshal(config)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  7. cmd/listen-notification-handlers.go

    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    
    		suffix = values[peerRESTListenSuffix][0]
    	}
    
    	pattern := event.NewPattern(prefix, suffix)
    
    	var eventNames []event.Name
    	var mask pubsub.Mask
    	for _, s := range values[peerRESTListenEvents] {
    		eventName, err := event.ParseName(s)
    		if err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. cmd/bucket-versioning-handler.go

    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	config, err := globalBucketVersioningSys.Get(bucket)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	configData, err := xml.Marshal(config)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 5K bytes
    - Viewed (0)
  9. cmd/bucket-notification-handlers.go

    		return
    	}
    
    	_, err := objAPI.GetBucketInfo(ctx, bucketName, BucketOptions{})
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    
    	config, err := globalBucketMetadataSys.GetNotificationConfig(bucketName)
    	if err != nil {
    		writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    		return
    	}
    	config.SetRegion(globalSite.Region)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 5.1K bytes
    - Viewed (0)
  10. cmd/admin-handler-utils.go

    	if entity == "" {
    		return toAPIError(ctx, fmt.Errorf("error exporting %s with: %w", fname, err))
    	}
    	return toAPIError(ctx, fmt.Errorf("error exporting %s from %s with: %w", entity, fname, err))
    }
    
    // wraps import error for more context
    func importError(ctx context.Context, err error, fname, entity string) APIError {
    	if entity == "" {
    		return toAPIError(ctx, fmt.Errorf("error importing %s with: %w", fname, err))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 8.2K bytes
    - Viewed (0)
Back to top