Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ToAPIErrWithErr (0.23 sec)

  1. cmd/bucket-replication-handlers.go

    	if len(tgtArns) == 0 {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrBadRequest, InvalidArgument{
    			Bucket: bucket,
    			Err:    fmt.Errorf("Remote target ARN %s missing or ineligible for replication resync", arn),
    		}), r.URL)
    		return
    	}
    
    	if len(tgtArns) > 1 && arn == "" {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrBadRequest, InvalidArgument{
    			Bucket: bucket,
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Oct 28 04:08:53 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  2. cmd/admin-bucket-handlers.go

    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    	var target madmin.BucketTarget
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err = json.Unmarshal(reqBytes, &target); err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  3. cmd/admin-handler-utils.go

    func importErrorWithAPIErr(ctx context.Context, apiErr APIErrorCode, err error, fname, entity string) APIError {
    	if entity == "" {
    		return errorCodes.ToAPIErrWithErr(apiErr, fmt.Errorf("error importing %s with: %w", fname, err))
    	}
    	return errorCodes.ToAPIErrWithErr(apiErr, fmt.Errorf("error importing %s from %s with: %w", entity, fname, err))
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 8.2K bytes
    - Viewed (0)
  4. cmd/tier-handlers.go

    	if objAPI == nil {
    		return
    	}
    
    	password := cred.SecretKey
    	reqBytes, err := madmin.DecryptData(password, io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    
    	var cfg madmin.TierConfig
    	json := jsoniter.ConfigCompatibleWithStandardLibrary
    	if err := json.Unmarshal(reqBytes, &cfg); err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 15 19:52:44 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  5. cmd/admin-handlers-idp-ldap.go

    				if isDN {
    					// warn user that DNs are not allowed
    					writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminLDAPExpectedLoginName, err), r.URL)
    				} else {
    					writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminNoSuchUser, err), r.URL)
    				}
    			}
    			writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    			return
    		}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Apr 06 05:26:02 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  6. cmd/bucket-replication.go

    		}
    		if checkRemote { // validate remote bucket
    			found, err := clnt.BucketExists(ctx, arn.Bucket)
    			if err != nil {
    				return sameTarget, errorCodes.ToAPIErrWithErr(ErrRemoteDestinationNotFoundError, err)
    			}
    			if !found {
    				return sameTarget, errorCodes.ToAPIErrWithErr(ErrRemoteDestinationNotFoundError, BucketRemoteTargetNotFound{Bucket: arn.Bucket})
    			}
    			if ret, err := globalBucketObjectLockSys.Get(bucket); err == nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 112K bytes
    - Viewed (1)
  7. cmd/admin-handlers-users.go

    	if err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    
    	var updateReq madmin.UpdateServiceAccountReq
    	if err = json.Unmarshal(reqBytes, &updateReq); err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrAdminConfigBadJSON, err), r.URL)
    		return
    	}
    
    	if err := updateReq.Validate(); err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 15:15:02 GMT 2024
    - 76K bytes
    - Viewed (0)
  8. cmd/api-errors.go

    	ErrAdminNoAccessKey
    	ErrAdminNoSecretKey
    
    	apiErrCodeEnd // This is used only for the testing code
    )
    
    type errorCodeMap map[APIErrorCode]APIError
    
    func (e errorCodeMap) ToAPIErrWithErr(errCode APIErrorCode, err error) APIError {
    	apiErr, ok := e[errCode]
    	if !ok {
    		apiErr = e[ErrInternalError]
    	}
    	if err != nil {
    		apiErr.Description = fmt.Sprintf("%s (%s)", apiErr.Description, err)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Apr 06 05:26:02 GMT 2024
    - 90.2K bytes
    - Viewed (6)
  9. cmd/batch-handlers.go

    	}
    
    	if _, success := proxyRequestByToken(ctx, w, r, jobID); success {
    		return
    	}
    
    	if err := globalBatchJobPool.canceler(jobID, true); err != nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErrWithErr(ErrInvalidRequest, err), r.URL)
    		return
    	}
    
    	j := BatchJobRequest{
    		ID: jobID,
    	}
    
    	j.delete(ctx, objectAPI)
    
    	writeSuccessNoContent(w)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 08 14:11:38 GMT 2024
    - 55.2K bytes
    - Viewed (0)
  10. cmd/bucket-handlers.go

    			return
    		}
    
    		// Make sure formValues adhere to policy restrictions.
    		if err = checkPostPolicy(formValues, postPolicyForm); err != nil {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErrWithErr(ErrAccessDenied, err), r.URL)
    			return
    		}
    
    		// Ensure that the object size is within expected range, also the file size
    		// should not exceed the maximum single Put size (5 GiB)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 61.6K bytes
    - Viewed (0)
Back to top