From 43468f4d47d64fc2d684c8197cb7350f0e8c350c Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 10 Jun 2023 21:59:51 -0700 Subject: [PATCH] return InvalidRequest when no parts are provided (#17395) --- cmd/api-errors.go | 6 + cmd/apierrorcode_string.go | 485 ++++++++++++++++--------------- cmd/object-multipart-handlers.go | 15 +- 3 files changed, 257 insertions(+), 249 deletions(-) diff --git a/cmd/api-errors.go b/cmd/api-errors.go index fd85834b4..13f42a68a 100644 --- a/cmd/api-errors.go +++ b/cmd/api-errors.go @@ -149,6 +149,7 @@ const ( ErrMethodNotAllowed ErrInvalidPart ErrInvalidPartOrder + ErrMissingPart ErrAuthorizationHeaderMalformed ErrMalformedPOSTRequest ErrPOSTFileRequired @@ -686,6 +687,11 @@ var errorCodes = errorCodeMap{ Description: "One or more of the specified parts could not be found. The part may not have been uploaded, or the specified entity tag may not match the part's entity tag.", HTTPStatusCode: http.StatusBadRequest, }, + ErrMissingPart: { + Code: "InvalidRequest", + Description: "You must specify at least one part", + HTTPStatusCode: http.StatusBadRequest, + }, ErrInvalidPartOrder: { Code: "InvalidPartOrder", Description: "The list of parts was not in ascending order. The parts list must be specified in order by part number.", diff --git a/cmd/apierrorcode_string.go b/cmd/apierrorcode_string.go index 454712d4f..7b0ab1473 100644 --- a/cmd/apierrorcode_string.go +++ b/cmd/apierrorcode_string.go @@ -80,251 +80,252 @@ func _() { _ = x[ErrMethodNotAllowed-69] _ = x[ErrInvalidPart-70] _ = x[ErrInvalidPartOrder-71] - _ = x[ErrAuthorizationHeaderMalformed-72] - _ = x[ErrMalformedPOSTRequest-73] - _ = x[ErrPOSTFileRequired-74] - _ = x[ErrSignatureVersionNotSupported-75] - _ = x[ErrBucketNotEmpty-76] - _ = x[ErrAllAccessDisabled-77] - _ = x[ErrPolicyInvalidVersion-78] - _ = x[ErrMissingFields-79] - _ = x[ErrMissingCredTag-80] - _ = x[ErrCredMalformed-81] - _ = x[ErrInvalidRegion-82] - _ = x[ErrInvalidServiceS3-83] - _ = x[ErrInvalidServiceSTS-84] - _ = x[ErrInvalidRequestVersion-85] - _ = x[ErrMissingSignTag-86] - _ = x[ErrMissingSignHeadersTag-87] - _ = x[ErrMalformedDate-88] - _ = x[ErrMalformedPresignedDate-89] - _ = x[ErrMalformedCredentialDate-90] - _ = x[ErrMalformedExpires-91] - _ = x[ErrNegativeExpires-92] - _ = x[ErrAuthHeaderEmpty-93] - _ = x[ErrExpiredPresignRequest-94] - _ = x[ErrRequestNotReadyYet-95] - _ = x[ErrUnsignedHeaders-96] - _ = x[ErrMissingDateHeader-97] - _ = x[ErrInvalidQuerySignatureAlgo-98] - _ = x[ErrInvalidQueryParams-99] - _ = x[ErrBucketAlreadyOwnedByYou-100] - _ = x[ErrInvalidDuration-101] - _ = x[ErrBucketAlreadyExists-102] - _ = x[ErrMetadataTooLarge-103] - _ = x[ErrUnsupportedMetadata-104] - _ = x[ErrMaximumExpires-105] - _ = x[ErrSlowDown-106] - _ = x[ErrInvalidPrefixMarker-107] - _ = x[ErrBadRequest-108] - _ = x[ErrKeyTooLongError-109] - _ = x[ErrInvalidBucketObjectLockConfiguration-110] - _ = x[ErrObjectLockConfigurationNotFound-111] - _ = x[ErrObjectLockConfigurationNotAllowed-112] - _ = x[ErrNoSuchObjectLockConfiguration-113] - _ = x[ErrObjectLocked-114] - _ = x[ErrInvalidRetentionDate-115] - _ = x[ErrPastObjectLockRetainDate-116] - _ = x[ErrUnknownWORMModeDirective-117] - _ = x[ErrBucketTaggingNotFound-118] - _ = x[ErrObjectLockInvalidHeaders-119] - _ = x[ErrInvalidTagDirective-120] - _ = x[ErrPolicyAlreadyAttached-121] - _ = x[ErrPolicyNotAttached-122] - _ = x[ErrExcessData-123] - _ = x[ErrInvalidEncryptionMethod-124] - _ = x[ErrInvalidEncryptionKeyID-125] - _ = x[ErrInsecureSSECustomerRequest-126] - _ = x[ErrSSEMultipartEncrypted-127] - _ = x[ErrSSEEncryptedObject-128] - _ = x[ErrInvalidEncryptionParameters-129] - _ = x[ErrInvalidEncryptionParametersSSEC-130] - _ = x[ErrInvalidSSECustomerAlgorithm-131] - _ = x[ErrInvalidSSECustomerKey-132] - _ = x[ErrMissingSSECustomerKey-133] - _ = x[ErrMissingSSECustomerKeyMD5-134] - _ = x[ErrSSECustomerKeyMD5Mismatch-135] - _ = x[ErrInvalidSSECustomerParameters-136] - _ = x[ErrIncompatibleEncryptionMethod-137] - _ = x[ErrKMSNotConfigured-138] - _ = x[ErrKMSKeyNotFoundException-139] - _ = x[ErrKMSDefaultKeyAlreadyConfigured-140] - _ = x[ErrNoAccessKey-141] - _ = x[ErrInvalidToken-142] - _ = x[ErrEventNotification-143] - _ = x[ErrARNNotification-144] - _ = x[ErrRegionNotification-145] - _ = x[ErrOverlappingFilterNotification-146] - _ = x[ErrFilterNameInvalid-147] - _ = x[ErrFilterNamePrefix-148] - _ = x[ErrFilterNameSuffix-149] - _ = x[ErrFilterValueInvalid-150] - _ = x[ErrOverlappingConfigs-151] - _ = x[ErrUnsupportedNotification-152] - _ = x[ErrContentSHA256Mismatch-153] - _ = x[ErrContentChecksumMismatch-154] - _ = x[ErrStorageFull-155] - _ = x[ErrRequestBodyParse-156] - _ = x[ErrObjectExistsAsDirectory-157] - _ = x[ErrInvalidObjectName-158] - _ = x[ErrInvalidObjectNamePrefixSlash-159] - _ = x[ErrInvalidResourceName-160] - _ = x[ErrInvalidLifecycleQueryParameter-161] - _ = x[ErrServerNotInitialized-162] - _ = x[ErrOperationTimedOut-163] - _ = x[ErrClientDisconnected-164] - _ = x[ErrOperationMaxedOut-165] - _ = x[ErrInvalidRequest-166] - _ = x[ErrTransitionStorageClassNotFoundError-167] - _ = x[ErrInvalidStorageClass-168] - _ = x[ErrBackendDown-169] - _ = x[ErrMalformedJSON-170] - _ = x[ErrAdminNoSuchUser-171] - _ = x[ErrAdminNoSuchUserLDAPWarn-172] - _ = x[ErrAdminNoSuchGroup-173] - _ = x[ErrAdminGroupNotEmpty-174] - _ = x[ErrAdminGroupDisabled-175] - _ = x[ErrAdminNoSuchJob-176] - _ = x[ErrAdminNoSuchPolicy-177] - _ = x[ErrAdminPolicyChangeAlreadyApplied-178] - _ = x[ErrAdminInvalidArgument-179] - _ = x[ErrAdminInvalidAccessKey-180] - _ = x[ErrAdminInvalidSecretKey-181] - _ = x[ErrAdminConfigNoQuorum-182] - _ = x[ErrAdminConfigTooLarge-183] - _ = x[ErrAdminConfigBadJSON-184] - _ = x[ErrAdminNoSuchConfigTarget-185] - _ = x[ErrAdminConfigEnvOverridden-186] - _ = x[ErrAdminConfigDuplicateKeys-187] - _ = x[ErrAdminConfigInvalidIDPType-188] - _ = x[ErrAdminConfigLDAPNonDefaultConfigName-189] - _ = x[ErrAdminConfigLDAPValidation-190] - _ = x[ErrAdminConfigIDPCfgNameAlreadyExists-191] - _ = x[ErrAdminConfigIDPCfgNameDoesNotExist-192] - _ = x[ErrAdminCredentialsMismatch-193] - _ = x[ErrInsecureClientRequest-194] - _ = x[ErrObjectTampered-195] - _ = x[ErrSiteReplicationInvalidRequest-196] - _ = x[ErrSiteReplicationPeerResp-197] - _ = x[ErrSiteReplicationBackendIssue-198] - _ = x[ErrSiteReplicationServiceAccountError-199] - _ = x[ErrSiteReplicationBucketConfigError-200] - _ = x[ErrSiteReplicationBucketMetaError-201] - _ = x[ErrSiteReplicationIAMError-202] - _ = x[ErrSiteReplicationConfigMissing-203] - _ = x[ErrAdminRebalanceAlreadyStarted-204] - _ = x[ErrAdminRebalanceNotStarted-205] - _ = x[ErrAdminBucketQuotaExceeded-206] - _ = x[ErrAdminNoSuchQuotaConfiguration-207] - _ = x[ErrHealNotImplemented-208] - _ = x[ErrHealNoSuchProcess-209] - _ = x[ErrHealInvalidClientToken-210] - _ = x[ErrHealMissingBucket-211] - _ = x[ErrHealAlreadyRunning-212] - _ = x[ErrHealOverlappingPaths-213] - _ = x[ErrIncorrectContinuationToken-214] - _ = x[ErrEmptyRequestBody-215] - _ = x[ErrUnsupportedFunction-216] - _ = x[ErrInvalidExpressionType-217] - _ = x[ErrBusy-218] - _ = x[ErrUnauthorizedAccess-219] - _ = x[ErrExpressionTooLong-220] - _ = x[ErrIllegalSQLFunctionArgument-221] - _ = x[ErrInvalidKeyPath-222] - _ = x[ErrInvalidCompressionFormat-223] - _ = x[ErrInvalidFileHeaderInfo-224] - _ = x[ErrInvalidJSONType-225] - _ = x[ErrInvalidQuoteFields-226] - _ = x[ErrInvalidRequestParameter-227] - _ = x[ErrInvalidDataType-228] - _ = x[ErrInvalidTextEncoding-229] - _ = x[ErrInvalidDataSource-230] - _ = x[ErrInvalidTableAlias-231] - _ = x[ErrMissingRequiredParameter-232] - _ = x[ErrObjectSerializationConflict-233] - _ = x[ErrUnsupportedSQLOperation-234] - _ = x[ErrUnsupportedSQLStructure-235] - _ = x[ErrUnsupportedSyntax-236] - _ = x[ErrUnsupportedRangeHeader-237] - _ = x[ErrLexerInvalidChar-238] - _ = x[ErrLexerInvalidOperator-239] - _ = x[ErrLexerInvalidLiteral-240] - _ = x[ErrLexerInvalidIONLiteral-241] - _ = x[ErrParseExpectedDatePart-242] - _ = x[ErrParseExpectedKeyword-243] - _ = x[ErrParseExpectedTokenType-244] - _ = x[ErrParseExpected2TokenTypes-245] - _ = x[ErrParseExpectedNumber-246] - _ = x[ErrParseExpectedRightParenBuiltinFunctionCall-247] - _ = x[ErrParseExpectedTypeName-248] - _ = x[ErrParseExpectedWhenClause-249] - _ = x[ErrParseUnsupportedToken-250] - _ = x[ErrParseUnsupportedLiteralsGroupBy-251] - _ = x[ErrParseExpectedMember-252] - _ = x[ErrParseUnsupportedSelect-253] - _ = x[ErrParseUnsupportedCase-254] - _ = x[ErrParseUnsupportedCaseClause-255] - _ = x[ErrParseUnsupportedAlias-256] - _ = x[ErrParseUnsupportedSyntax-257] - _ = x[ErrParseUnknownOperator-258] - _ = x[ErrParseMissingIdentAfterAt-259] - _ = x[ErrParseUnexpectedOperator-260] - _ = x[ErrParseUnexpectedTerm-261] - _ = x[ErrParseUnexpectedToken-262] - _ = x[ErrParseUnexpectedKeyword-263] - _ = x[ErrParseExpectedExpression-264] - _ = x[ErrParseExpectedLeftParenAfterCast-265] - _ = x[ErrParseExpectedLeftParenValueConstructor-266] - _ = x[ErrParseExpectedLeftParenBuiltinFunctionCall-267] - _ = x[ErrParseExpectedArgumentDelimiter-268] - _ = x[ErrParseCastArity-269] - _ = x[ErrParseInvalidTypeParam-270] - _ = x[ErrParseEmptySelect-271] - _ = x[ErrParseSelectMissingFrom-272] - _ = x[ErrParseExpectedIdentForGroupName-273] - _ = x[ErrParseExpectedIdentForAlias-274] - _ = x[ErrParseUnsupportedCallWithStar-275] - _ = x[ErrParseNonUnaryAgregateFunctionCall-276] - _ = x[ErrParseMalformedJoin-277] - _ = x[ErrParseExpectedIdentForAt-278] - _ = x[ErrParseAsteriskIsNotAloneInSelectList-279] - _ = x[ErrParseCannotMixSqbAndWildcardInSelectList-280] - _ = x[ErrParseInvalidContextForWildcardInSelectList-281] - _ = x[ErrIncorrectSQLFunctionArgumentType-282] - _ = x[ErrValueParseFailure-283] - _ = x[ErrEvaluatorInvalidArguments-284] - _ = x[ErrIntegerOverflow-285] - _ = x[ErrLikeInvalidInputs-286] - _ = x[ErrCastFailed-287] - _ = x[ErrInvalidCast-288] - _ = x[ErrEvaluatorInvalidTimestampFormatPattern-289] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing-290] - _ = x[ErrEvaluatorTimestampFormatPatternDuplicateFields-291] - _ = x[ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch-292] - _ = x[ErrEvaluatorUnterminatedTimestampFormatPatternToken-293] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternToken-294] - _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbol-295] - _ = x[ErrEvaluatorBindingDoesNotExist-296] - _ = x[ErrMissingHeaders-297] - _ = x[ErrInvalidColumnIndex-298] - _ = x[ErrAdminConfigNotificationTargetsFailed-299] - _ = x[ErrAdminProfilerNotEnabled-300] - _ = x[ErrInvalidDecompressedSize-301] - _ = x[ErrAddUserInvalidArgument-302] - _ = x[ErrAdminResourceInvalidArgument-303] - _ = x[ErrAdminAccountNotEligible-304] - _ = x[ErrAccountNotEligible-305] - _ = x[ErrAdminServiceAccountNotFound-306] - _ = x[ErrPostPolicyConditionInvalidFormat-307] - _ = x[ErrInvalidChecksum-308] - _ = x[ErrLambdaARNInvalid-309] - _ = x[ErrLambdaARNNotFound-310] - _ = x[apiErrCodeEnd-311] + _ = x[ErrMissingPart-72] + _ = x[ErrAuthorizationHeaderMalformed-73] + _ = x[ErrMalformedPOSTRequest-74] + _ = x[ErrPOSTFileRequired-75] + _ = x[ErrSignatureVersionNotSupported-76] + _ = x[ErrBucketNotEmpty-77] + _ = x[ErrAllAccessDisabled-78] + _ = x[ErrPolicyInvalidVersion-79] + _ = x[ErrMissingFields-80] + _ = x[ErrMissingCredTag-81] + _ = x[ErrCredMalformed-82] + _ = x[ErrInvalidRegion-83] + _ = x[ErrInvalidServiceS3-84] + _ = x[ErrInvalidServiceSTS-85] + _ = x[ErrInvalidRequestVersion-86] + _ = x[ErrMissingSignTag-87] + _ = x[ErrMissingSignHeadersTag-88] + _ = x[ErrMalformedDate-89] + _ = x[ErrMalformedPresignedDate-90] + _ = x[ErrMalformedCredentialDate-91] + _ = x[ErrMalformedExpires-92] + _ = x[ErrNegativeExpires-93] + _ = x[ErrAuthHeaderEmpty-94] + _ = x[ErrExpiredPresignRequest-95] + _ = x[ErrRequestNotReadyYet-96] + _ = x[ErrUnsignedHeaders-97] + _ = x[ErrMissingDateHeader-98] + _ = x[ErrInvalidQuerySignatureAlgo-99] + _ = x[ErrInvalidQueryParams-100] + _ = x[ErrBucketAlreadyOwnedByYou-101] + _ = x[ErrInvalidDuration-102] + _ = x[ErrBucketAlreadyExists-103] + _ = x[ErrMetadataTooLarge-104] + _ = x[ErrUnsupportedMetadata-105] + _ = x[ErrMaximumExpires-106] + _ = x[ErrSlowDown-107] + _ = x[ErrInvalidPrefixMarker-108] + _ = x[ErrBadRequest-109] + _ = x[ErrKeyTooLongError-110] + _ = x[ErrInvalidBucketObjectLockConfiguration-111] + _ = x[ErrObjectLockConfigurationNotFound-112] + _ = x[ErrObjectLockConfigurationNotAllowed-113] + _ = x[ErrNoSuchObjectLockConfiguration-114] + _ = x[ErrObjectLocked-115] + _ = x[ErrInvalidRetentionDate-116] + _ = x[ErrPastObjectLockRetainDate-117] + _ = x[ErrUnknownWORMModeDirective-118] + _ = x[ErrBucketTaggingNotFound-119] + _ = x[ErrObjectLockInvalidHeaders-120] + _ = x[ErrInvalidTagDirective-121] + _ = x[ErrPolicyAlreadyAttached-122] + _ = x[ErrPolicyNotAttached-123] + _ = x[ErrExcessData-124] + _ = x[ErrInvalidEncryptionMethod-125] + _ = x[ErrInvalidEncryptionKeyID-126] + _ = x[ErrInsecureSSECustomerRequest-127] + _ = x[ErrSSEMultipartEncrypted-128] + _ = x[ErrSSEEncryptedObject-129] + _ = x[ErrInvalidEncryptionParameters-130] + _ = x[ErrInvalidEncryptionParametersSSEC-131] + _ = x[ErrInvalidSSECustomerAlgorithm-132] + _ = x[ErrInvalidSSECustomerKey-133] + _ = x[ErrMissingSSECustomerKey-134] + _ = x[ErrMissingSSECustomerKeyMD5-135] + _ = x[ErrSSECustomerKeyMD5Mismatch-136] + _ = x[ErrInvalidSSECustomerParameters-137] + _ = x[ErrIncompatibleEncryptionMethod-138] + _ = x[ErrKMSNotConfigured-139] + _ = x[ErrKMSKeyNotFoundException-140] + _ = x[ErrKMSDefaultKeyAlreadyConfigured-141] + _ = x[ErrNoAccessKey-142] + _ = x[ErrInvalidToken-143] + _ = x[ErrEventNotification-144] + _ = x[ErrARNNotification-145] + _ = x[ErrRegionNotification-146] + _ = x[ErrOverlappingFilterNotification-147] + _ = x[ErrFilterNameInvalid-148] + _ = x[ErrFilterNamePrefix-149] + _ = x[ErrFilterNameSuffix-150] + _ = x[ErrFilterValueInvalid-151] + _ = x[ErrOverlappingConfigs-152] + _ = x[ErrUnsupportedNotification-153] + _ = x[ErrContentSHA256Mismatch-154] + _ = x[ErrContentChecksumMismatch-155] + _ = x[ErrStorageFull-156] + _ = x[ErrRequestBodyParse-157] + _ = x[ErrObjectExistsAsDirectory-158] + _ = x[ErrInvalidObjectName-159] + _ = x[ErrInvalidObjectNamePrefixSlash-160] + _ = x[ErrInvalidResourceName-161] + _ = x[ErrInvalidLifecycleQueryParameter-162] + _ = x[ErrServerNotInitialized-163] + _ = x[ErrOperationTimedOut-164] + _ = x[ErrClientDisconnected-165] + _ = x[ErrOperationMaxedOut-166] + _ = x[ErrInvalidRequest-167] + _ = x[ErrTransitionStorageClassNotFoundError-168] + _ = x[ErrInvalidStorageClass-169] + _ = x[ErrBackendDown-170] + _ = x[ErrMalformedJSON-171] + _ = x[ErrAdminNoSuchUser-172] + _ = x[ErrAdminNoSuchUserLDAPWarn-173] + _ = x[ErrAdminNoSuchGroup-174] + _ = x[ErrAdminGroupNotEmpty-175] + _ = x[ErrAdminGroupDisabled-176] + _ = x[ErrAdminNoSuchJob-177] + _ = x[ErrAdminNoSuchPolicy-178] + _ = x[ErrAdminPolicyChangeAlreadyApplied-179] + _ = x[ErrAdminInvalidArgument-180] + _ = x[ErrAdminInvalidAccessKey-181] + _ = x[ErrAdminInvalidSecretKey-182] + _ = x[ErrAdminConfigNoQuorum-183] + _ = x[ErrAdminConfigTooLarge-184] + _ = x[ErrAdminConfigBadJSON-185] + _ = x[ErrAdminNoSuchConfigTarget-186] + _ = x[ErrAdminConfigEnvOverridden-187] + _ = x[ErrAdminConfigDuplicateKeys-188] + _ = x[ErrAdminConfigInvalidIDPType-189] + _ = x[ErrAdminConfigLDAPNonDefaultConfigName-190] + _ = x[ErrAdminConfigLDAPValidation-191] + _ = x[ErrAdminConfigIDPCfgNameAlreadyExists-192] + _ = x[ErrAdminConfigIDPCfgNameDoesNotExist-193] + _ = x[ErrAdminCredentialsMismatch-194] + _ = x[ErrInsecureClientRequest-195] + _ = x[ErrObjectTampered-196] + _ = x[ErrSiteReplicationInvalidRequest-197] + _ = x[ErrSiteReplicationPeerResp-198] + _ = x[ErrSiteReplicationBackendIssue-199] + _ = x[ErrSiteReplicationServiceAccountError-200] + _ = x[ErrSiteReplicationBucketConfigError-201] + _ = x[ErrSiteReplicationBucketMetaError-202] + _ = x[ErrSiteReplicationIAMError-203] + _ = x[ErrSiteReplicationConfigMissing-204] + _ = x[ErrAdminRebalanceAlreadyStarted-205] + _ = x[ErrAdminRebalanceNotStarted-206] + _ = x[ErrAdminBucketQuotaExceeded-207] + _ = x[ErrAdminNoSuchQuotaConfiguration-208] + _ = x[ErrHealNotImplemented-209] + _ = x[ErrHealNoSuchProcess-210] + _ = x[ErrHealInvalidClientToken-211] + _ = x[ErrHealMissingBucket-212] + _ = x[ErrHealAlreadyRunning-213] + _ = x[ErrHealOverlappingPaths-214] + _ = x[ErrIncorrectContinuationToken-215] + _ = x[ErrEmptyRequestBody-216] + _ = x[ErrUnsupportedFunction-217] + _ = x[ErrInvalidExpressionType-218] + _ = x[ErrBusy-219] + _ = x[ErrUnauthorizedAccess-220] + _ = x[ErrExpressionTooLong-221] + _ = x[ErrIllegalSQLFunctionArgument-222] + _ = x[ErrInvalidKeyPath-223] + _ = x[ErrInvalidCompressionFormat-224] + _ = x[ErrInvalidFileHeaderInfo-225] + _ = x[ErrInvalidJSONType-226] + _ = x[ErrInvalidQuoteFields-227] + _ = x[ErrInvalidRequestParameter-228] + _ = x[ErrInvalidDataType-229] + _ = x[ErrInvalidTextEncoding-230] + _ = x[ErrInvalidDataSource-231] + _ = x[ErrInvalidTableAlias-232] + _ = x[ErrMissingRequiredParameter-233] + _ = x[ErrObjectSerializationConflict-234] + _ = x[ErrUnsupportedSQLOperation-235] + _ = x[ErrUnsupportedSQLStructure-236] + _ = x[ErrUnsupportedSyntax-237] + _ = x[ErrUnsupportedRangeHeader-238] + _ = x[ErrLexerInvalidChar-239] + _ = x[ErrLexerInvalidOperator-240] + _ = x[ErrLexerInvalidLiteral-241] + _ = x[ErrLexerInvalidIONLiteral-242] + _ = x[ErrParseExpectedDatePart-243] + _ = x[ErrParseExpectedKeyword-244] + _ = x[ErrParseExpectedTokenType-245] + _ = x[ErrParseExpected2TokenTypes-246] + _ = x[ErrParseExpectedNumber-247] + _ = x[ErrParseExpectedRightParenBuiltinFunctionCall-248] + _ = x[ErrParseExpectedTypeName-249] + _ = x[ErrParseExpectedWhenClause-250] + _ = x[ErrParseUnsupportedToken-251] + _ = x[ErrParseUnsupportedLiteralsGroupBy-252] + _ = x[ErrParseExpectedMember-253] + _ = x[ErrParseUnsupportedSelect-254] + _ = x[ErrParseUnsupportedCase-255] + _ = x[ErrParseUnsupportedCaseClause-256] + _ = x[ErrParseUnsupportedAlias-257] + _ = x[ErrParseUnsupportedSyntax-258] + _ = x[ErrParseUnknownOperator-259] + _ = x[ErrParseMissingIdentAfterAt-260] + _ = x[ErrParseUnexpectedOperator-261] + _ = x[ErrParseUnexpectedTerm-262] + _ = x[ErrParseUnexpectedToken-263] + _ = x[ErrParseUnexpectedKeyword-264] + _ = x[ErrParseExpectedExpression-265] + _ = x[ErrParseExpectedLeftParenAfterCast-266] + _ = x[ErrParseExpectedLeftParenValueConstructor-267] + _ = x[ErrParseExpectedLeftParenBuiltinFunctionCall-268] + _ = x[ErrParseExpectedArgumentDelimiter-269] + _ = x[ErrParseCastArity-270] + _ = x[ErrParseInvalidTypeParam-271] + _ = x[ErrParseEmptySelect-272] + _ = x[ErrParseSelectMissingFrom-273] + _ = x[ErrParseExpectedIdentForGroupName-274] + _ = x[ErrParseExpectedIdentForAlias-275] + _ = x[ErrParseUnsupportedCallWithStar-276] + _ = x[ErrParseNonUnaryAgregateFunctionCall-277] + _ = x[ErrParseMalformedJoin-278] + _ = x[ErrParseExpectedIdentForAt-279] + _ = x[ErrParseAsteriskIsNotAloneInSelectList-280] + _ = x[ErrParseCannotMixSqbAndWildcardInSelectList-281] + _ = x[ErrParseInvalidContextForWildcardInSelectList-282] + _ = x[ErrIncorrectSQLFunctionArgumentType-283] + _ = x[ErrValueParseFailure-284] + _ = x[ErrEvaluatorInvalidArguments-285] + _ = x[ErrIntegerOverflow-286] + _ = x[ErrLikeInvalidInputs-287] + _ = x[ErrCastFailed-288] + _ = x[ErrInvalidCast-289] + _ = x[ErrEvaluatorInvalidTimestampFormatPattern-290] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbolForParsing-291] + _ = x[ErrEvaluatorTimestampFormatPatternDuplicateFields-292] + _ = x[ErrEvaluatorTimestampFormatPatternHourClockAmPmMismatch-293] + _ = x[ErrEvaluatorUnterminatedTimestampFormatPatternToken-294] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternToken-295] + _ = x[ErrEvaluatorInvalidTimestampFormatPatternSymbol-296] + _ = x[ErrEvaluatorBindingDoesNotExist-297] + _ = x[ErrMissingHeaders-298] + _ = x[ErrInvalidColumnIndex-299] + _ = x[ErrAdminConfigNotificationTargetsFailed-300] + _ = x[ErrAdminProfilerNotEnabled-301] + _ = x[ErrInvalidDecompressedSize-302] + _ = x[ErrAddUserInvalidArgument-303] + _ = x[ErrAdminResourceInvalidArgument-304] + _ = x[ErrAdminAccountNotEligible-305] + _ = x[ErrAccountNotEligible-306] + _ = x[ErrAdminServiceAccountNotFound-307] + _ = x[ErrPostPolicyConditionInvalidFormat-308] + _ = x[ErrInvalidChecksum-309] + _ = x[ErrLambdaARNInvalid-310] + _ = x[ErrLambdaARNNotFound-311] + _ = x[apiErrCodeEnd-312] } -const _APIErrorCode_name = "NoneAccessDeniedBadDigestEntityTooSmallEntityTooLargePolicyTooLargeIncompleteBodyInternalErrorInvalidAccessKeyIDAccessKeyDisabledInvalidBucketNameInvalidDigestInvalidRangeInvalidRangePartNumberInvalidCopyPartRangeInvalidCopyPartRangeSourceInvalidMaxKeysInvalidEncodingMethodInvalidMaxUploadsInvalidMaxPartsInvalidPartNumberMarkerInvalidPartNumberInvalidRequestBodyInvalidCopySourceInvalidMetadataDirectiveInvalidCopyDestInvalidPolicyDocumentInvalidObjectStateMalformedXMLMissingContentLengthMissingContentMD5MissingRequestBodyErrorMissingSecurityHeaderNoSuchBucketNoSuchBucketPolicyNoSuchBucketLifecycleNoSuchLifecycleConfigurationInvalidLifecycleWithObjectLockNoSuchBucketSSEConfigNoSuchCORSConfigurationNoSuchWebsiteConfigurationReplicationConfigurationNotFoundErrorRemoteDestinationNotFoundErrorReplicationDestinationMissingLockRemoteTargetNotFoundErrorReplicationRemoteConnectionErrorReplicationBandwidthLimitErrorBucketRemoteIdenticalToSourceBucketRemoteAlreadyExistsBucketRemoteLabelInUseBucketRemoteArnTypeInvalidBucketRemoteArnInvalidBucketRemoteRemoveDisallowedRemoteTargetNotVersionedErrorReplicationSourceNotVersionedErrorReplicationNeedsVersioningErrorReplicationBucketNeedsVersioningErrorReplicationDenyEditErrorRemoteTargetDenyAddErrorReplicationNoExistingObjectsObjectRestoreAlreadyInProgressNoSuchKeyNoSuchUploadInvalidVersionIDNoSuchVersionNotImplementedPreconditionFailedRequestTimeTooSkewedSignatureDoesNotMatchMethodNotAllowedInvalidPartInvalidPartOrderAuthorizationHeaderMalformedMalformedPOSTRequestPOSTFileRequiredSignatureVersionNotSupportedBucketNotEmptyAllAccessDisabledPolicyInvalidVersionMissingFieldsMissingCredTagCredMalformedInvalidRegionInvalidServiceS3InvalidServiceSTSInvalidRequestVersionMissingSignTagMissingSignHeadersTagMalformedDateMalformedPresignedDateMalformedCredentialDateMalformedExpiresNegativeExpiresAuthHeaderEmptyExpiredPresignRequestRequestNotReadyYetUnsignedHeadersMissingDateHeaderInvalidQuerySignatureAlgoInvalidQueryParamsBucketAlreadyOwnedByYouInvalidDurationBucketAlreadyExistsMetadataTooLargeUnsupportedMetadataMaximumExpiresSlowDownInvalidPrefixMarkerBadRequestKeyTooLongErrorInvalidBucketObjectLockConfigurationObjectLockConfigurationNotFoundObjectLockConfigurationNotAllowedNoSuchObjectLockConfigurationObjectLockedInvalidRetentionDatePastObjectLockRetainDateUnknownWORMModeDirectiveBucketTaggingNotFoundObjectLockInvalidHeadersInvalidTagDirectivePolicyAlreadyAttachedPolicyNotAttachedExcessDataInvalidEncryptionMethodInvalidEncryptionKeyIDInsecureSSECustomerRequestSSEMultipartEncryptedSSEEncryptedObjectInvalidEncryptionParametersInvalidEncryptionParametersSSECInvalidSSECustomerAlgorithmInvalidSSECustomerKeyMissingSSECustomerKeyMissingSSECustomerKeyMD5SSECustomerKeyMD5MismatchInvalidSSECustomerParametersIncompatibleEncryptionMethodKMSNotConfiguredKMSKeyNotFoundExceptionKMSDefaultKeyAlreadyConfiguredNoAccessKeyInvalidTokenEventNotificationARNNotificationRegionNotificationOverlappingFilterNotificationFilterNameInvalidFilterNamePrefixFilterNameSuffixFilterValueInvalidOverlappingConfigsUnsupportedNotificationContentSHA256MismatchContentChecksumMismatchStorageFullRequestBodyParseObjectExistsAsDirectoryInvalidObjectNameInvalidObjectNamePrefixSlashInvalidResourceNameInvalidLifecycleQueryParameterServerNotInitializedOperationTimedOutClientDisconnectedOperationMaxedOutInvalidRequestTransitionStorageClassNotFoundErrorInvalidStorageClassBackendDownMalformedJSONAdminNoSuchUserAdminNoSuchUserLDAPWarnAdminNoSuchGroupAdminGroupNotEmptyAdminGroupDisabledAdminNoSuchJobAdminNoSuchPolicyAdminPolicyChangeAlreadyAppliedAdminInvalidArgumentAdminInvalidAccessKeyAdminInvalidSecretKeyAdminConfigNoQuorumAdminConfigTooLargeAdminConfigBadJSONAdminNoSuchConfigTargetAdminConfigEnvOverriddenAdminConfigDuplicateKeysAdminConfigInvalidIDPTypeAdminConfigLDAPNonDefaultConfigNameAdminConfigLDAPValidationAdminConfigIDPCfgNameAlreadyExistsAdminConfigIDPCfgNameDoesNotExistAdminCredentialsMismatchInsecureClientRequestObjectTamperedSiteReplicationInvalidRequestSiteReplicationPeerRespSiteReplicationBackendIssueSiteReplicationServiceAccountErrorSiteReplicationBucketConfigErrorSiteReplicationBucketMetaErrorSiteReplicationIAMErrorSiteReplicationConfigMissingAdminRebalanceAlreadyStartedAdminRebalanceNotStartedAdminBucketQuotaExceededAdminNoSuchQuotaConfigurationHealNotImplementedHealNoSuchProcessHealInvalidClientTokenHealMissingBucketHealAlreadyRunningHealOverlappingPathsIncorrectContinuationTokenEmptyRequestBodyUnsupportedFunctionInvalidExpressionTypeBusyUnauthorizedAccessExpressionTooLongIllegalSQLFunctionArgumentInvalidKeyPathInvalidCompressionFormatInvalidFileHeaderInfoInvalidJSONTypeInvalidQuoteFieldsInvalidRequestParameterInvalidDataTypeInvalidTextEncodingInvalidDataSourceInvalidTableAliasMissingRequiredParameterObjectSerializationConflictUnsupportedSQLOperationUnsupportedSQLStructureUnsupportedSyntaxUnsupportedRangeHeaderLexerInvalidCharLexerInvalidOperatorLexerInvalidLiteralLexerInvalidIONLiteralParseExpectedDatePartParseExpectedKeywordParseExpectedTokenTypeParseExpected2TokenTypesParseExpectedNumberParseExpectedRightParenBuiltinFunctionCallParseExpectedTypeNameParseExpectedWhenClauseParseUnsupportedTokenParseUnsupportedLiteralsGroupByParseExpectedMemberParseUnsupportedSelectParseUnsupportedCaseParseUnsupportedCaseClauseParseUnsupportedAliasParseUnsupportedSyntaxParseUnknownOperatorParseMissingIdentAfterAtParseUnexpectedOperatorParseUnexpectedTermParseUnexpectedTokenParseUnexpectedKeywordParseExpectedExpressionParseExpectedLeftParenAfterCastParseExpectedLeftParenValueConstructorParseExpectedLeftParenBuiltinFunctionCallParseExpectedArgumentDelimiterParseCastArityParseInvalidTypeParamParseEmptySelectParseSelectMissingFromParseExpectedIdentForGroupNameParseExpectedIdentForAliasParseUnsupportedCallWithStarParseNonUnaryAgregateFunctionCallParseMalformedJoinParseExpectedIdentForAtParseAsteriskIsNotAloneInSelectListParseCannotMixSqbAndWildcardInSelectListParseInvalidContextForWildcardInSelectListIncorrectSQLFunctionArgumentTypeValueParseFailureEvaluatorInvalidArgumentsIntegerOverflowLikeInvalidInputsCastFailedInvalidCastEvaluatorInvalidTimestampFormatPatternEvaluatorInvalidTimestampFormatPatternSymbolForParsingEvaluatorTimestampFormatPatternDuplicateFieldsEvaluatorTimestampFormatPatternHourClockAmPmMismatchEvaluatorUnterminatedTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternSymbolEvaluatorBindingDoesNotExistMissingHeadersInvalidColumnIndexAdminConfigNotificationTargetsFailedAdminProfilerNotEnabledInvalidDecompressedSizeAddUserInvalidArgumentAdminResourceInvalidArgumentAdminAccountNotEligibleAccountNotEligibleAdminServiceAccountNotFoundPostPolicyConditionInvalidFormatInvalidChecksumLambdaARNInvalidLambdaARNNotFoundapiErrCodeEnd" +const _APIErrorCode_name = "NoneAccessDeniedBadDigestEntityTooSmallEntityTooLargePolicyTooLargeIncompleteBodyInternalErrorInvalidAccessKeyIDAccessKeyDisabledInvalidBucketNameInvalidDigestInvalidRangeInvalidRangePartNumberInvalidCopyPartRangeInvalidCopyPartRangeSourceInvalidMaxKeysInvalidEncodingMethodInvalidMaxUploadsInvalidMaxPartsInvalidPartNumberMarkerInvalidPartNumberInvalidRequestBodyInvalidCopySourceInvalidMetadataDirectiveInvalidCopyDestInvalidPolicyDocumentInvalidObjectStateMalformedXMLMissingContentLengthMissingContentMD5MissingRequestBodyErrorMissingSecurityHeaderNoSuchBucketNoSuchBucketPolicyNoSuchBucketLifecycleNoSuchLifecycleConfigurationInvalidLifecycleWithObjectLockNoSuchBucketSSEConfigNoSuchCORSConfigurationNoSuchWebsiteConfigurationReplicationConfigurationNotFoundErrorRemoteDestinationNotFoundErrorReplicationDestinationMissingLockRemoteTargetNotFoundErrorReplicationRemoteConnectionErrorReplicationBandwidthLimitErrorBucketRemoteIdenticalToSourceBucketRemoteAlreadyExistsBucketRemoteLabelInUseBucketRemoteArnTypeInvalidBucketRemoteArnInvalidBucketRemoteRemoveDisallowedRemoteTargetNotVersionedErrorReplicationSourceNotVersionedErrorReplicationNeedsVersioningErrorReplicationBucketNeedsVersioningErrorReplicationDenyEditErrorRemoteTargetDenyAddErrorReplicationNoExistingObjectsObjectRestoreAlreadyInProgressNoSuchKeyNoSuchUploadInvalidVersionIDNoSuchVersionNotImplementedPreconditionFailedRequestTimeTooSkewedSignatureDoesNotMatchMethodNotAllowedInvalidPartInvalidPartOrderMissingPartAuthorizationHeaderMalformedMalformedPOSTRequestPOSTFileRequiredSignatureVersionNotSupportedBucketNotEmptyAllAccessDisabledPolicyInvalidVersionMissingFieldsMissingCredTagCredMalformedInvalidRegionInvalidServiceS3InvalidServiceSTSInvalidRequestVersionMissingSignTagMissingSignHeadersTagMalformedDateMalformedPresignedDateMalformedCredentialDateMalformedExpiresNegativeExpiresAuthHeaderEmptyExpiredPresignRequestRequestNotReadyYetUnsignedHeadersMissingDateHeaderInvalidQuerySignatureAlgoInvalidQueryParamsBucketAlreadyOwnedByYouInvalidDurationBucketAlreadyExistsMetadataTooLargeUnsupportedMetadataMaximumExpiresSlowDownInvalidPrefixMarkerBadRequestKeyTooLongErrorInvalidBucketObjectLockConfigurationObjectLockConfigurationNotFoundObjectLockConfigurationNotAllowedNoSuchObjectLockConfigurationObjectLockedInvalidRetentionDatePastObjectLockRetainDateUnknownWORMModeDirectiveBucketTaggingNotFoundObjectLockInvalidHeadersInvalidTagDirectivePolicyAlreadyAttachedPolicyNotAttachedExcessDataInvalidEncryptionMethodInvalidEncryptionKeyIDInsecureSSECustomerRequestSSEMultipartEncryptedSSEEncryptedObjectInvalidEncryptionParametersInvalidEncryptionParametersSSECInvalidSSECustomerAlgorithmInvalidSSECustomerKeyMissingSSECustomerKeyMissingSSECustomerKeyMD5SSECustomerKeyMD5MismatchInvalidSSECustomerParametersIncompatibleEncryptionMethodKMSNotConfiguredKMSKeyNotFoundExceptionKMSDefaultKeyAlreadyConfiguredNoAccessKeyInvalidTokenEventNotificationARNNotificationRegionNotificationOverlappingFilterNotificationFilterNameInvalidFilterNamePrefixFilterNameSuffixFilterValueInvalidOverlappingConfigsUnsupportedNotificationContentSHA256MismatchContentChecksumMismatchStorageFullRequestBodyParseObjectExistsAsDirectoryInvalidObjectNameInvalidObjectNamePrefixSlashInvalidResourceNameInvalidLifecycleQueryParameterServerNotInitializedOperationTimedOutClientDisconnectedOperationMaxedOutInvalidRequestTransitionStorageClassNotFoundErrorInvalidStorageClassBackendDownMalformedJSONAdminNoSuchUserAdminNoSuchUserLDAPWarnAdminNoSuchGroupAdminGroupNotEmptyAdminGroupDisabledAdminNoSuchJobAdminNoSuchPolicyAdminPolicyChangeAlreadyAppliedAdminInvalidArgumentAdminInvalidAccessKeyAdminInvalidSecretKeyAdminConfigNoQuorumAdminConfigTooLargeAdminConfigBadJSONAdminNoSuchConfigTargetAdminConfigEnvOverriddenAdminConfigDuplicateKeysAdminConfigInvalidIDPTypeAdminConfigLDAPNonDefaultConfigNameAdminConfigLDAPValidationAdminConfigIDPCfgNameAlreadyExistsAdminConfigIDPCfgNameDoesNotExistAdminCredentialsMismatchInsecureClientRequestObjectTamperedSiteReplicationInvalidRequestSiteReplicationPeerRespSiteReplicationBackendIssueSiteReplicationServiceAccountErrorSiteReplicationBucketConfigErrorSiteReplicationBucketMetaErrorSiteReplicationIAMErrorSiteReplicationConfigMissingAdminRebalanceAlreadyStartedAdminRebalanceNotStartedAdminBucketQuotaExceededAdminNoSuchQuotaConfigurationHealNotImplementedHealNoSuchProcessHealInvalidClientTokenHealMissingBucketHealAlreadyRunningHealOverlappingPathsIncorrectContinuationTokenEmptyRequestBodyUnsupportedFunctionInvalidExpressionTypeBusyUnauthorizedAccessExpressionTooLongIllegalSQLFunctionArgumentInvalidKeyPathInvalidCompressionFormatInvalidFileHeaderInfoInvalidJSONTypeInvalidQuoteFieldsInvalidRequestParameterInvalidDataTypeInvalidTextEncodingInvalidDataSourceInvalidTableAliasMissingRequiredParameterObjectSerializationConflictUnsupportedSQLOperationUnsupportedSQLStructureUnsupportedSyntaxUnsupportedRangeHeaderLexerInvalidCharLexerInvalidOperatorLexerInvalidLiteralLexerInvalidIONLiteralParseExpectedDatePartParseExpectedKeywordParseExpectedTokenTypeParseExpected2TokenTypesParseExpectedNumberParseExpectedRightParenBuiltinFunctionCallParseExpectedTypeNameParseExpectedWhenClauseParseUnsupportedTokenParseUnsupportedLiteralsGroupByParseExpectedMemberParseUnsupportedSelectParseUnsupportedCaseParseUnsupportedCaseClauseParseUnsupportedAliasParseUnsupportedSyntaxParseUnknownOperatorParseMissingIdentAfterAtParseUnexpectedOperatorParseUnexpectedTermParseUnexpectedTokenParseUnexpectedKeywordParseExpectedExpressionParseExpectedLeftParenAfterCastParseExpectedLeftParenValueConstructorParseExpectedLeftParenBuiltinFunctionCallParseExpectedArgumentDelimiterParseCastArityParseInvalidTypeParamParseEmptySelectParseSelectMissingFromParseExpectedIdentForGroupNameParseExpectedIdentForAliasParseUnsupportedCallWithStarParseNonUnaryAgregateFunctionCallParseMalformedJoinParseExpectedIdentForAtParseAsteriskIsNotAloneInSelectListParseCannotMixSqbAndWildcardInSelectListParseInvalidContextForWildcardInSelectListIncorrectSQLFunctionArgumentTypeValueParseFailureEvaluatorInvalidArgumentsIntegerOverflowLikeInvalidInputsCastFailedInvalidCastEvaluatorInvalidTimestampFormatPatternEvaluatorInvalidTimestampFormatPatternSymbolForParsingEvaluatorTimestampFormatPatternDuplicateFieldsEvaluatorTimestampFormatPatternHourClockAmPmMismatchEvaluatorUnterminatedTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternTokenEvaluatorInvalidTimestampFormatPatternSymbolEvaluatorBindingDoesNotExistMissingHeadersInvalidColumnIndexAdminConfigNotificationTargetsFailedAdminProfilerNotEnabledInvalidDecompressedSizeAddUserInvalidArgumentAdminResourceInvalidArgumentAdminAccountNotEligibleAccountNotEligibleAdminServiceAccountNotFoundPostPolicyConditionInvalidFormatInvalidChecksumLambdaARNInvalidLambdaARNNotFoundapiErrCodeEnd" -var _APIErrorCode_index = [...]uint16{0, 4, 16, 25, 39, 53, 67, 81, 94, 112, 129, 146, 159, 171, 193, 213, 239, 253, 274, 291, 306, 329, 346, 364, 381, 405, 420, 441, 459, 471, 491, 508, 531, 552, 564, 582, 603, 631, 661, 682, 705, 731, 768, 798, 831, 856, 888, 918, 947, 972, 994, 1020, 1042, 1070, 1099, 1133, 1164, 1201, 1225, 1249, 1277, 1307, 1316, 1328, 1344, 1357, 1371, 1389, 1409, 1430, 1446, 1457, 1473, 1501, 1521, 1537, 1565, 1579, 1596, 1616, 1629, 1643, 1656, 1669, 1685, 1702, 1723, 1737, 1758, 1771, 1793, 1816, 1832, 1847, 1862, 1883, 1901, 1916, 1933, 1958, 1976, 1999, 2014, 2033, 2049, 2068, 2082, 2090, 2109, 2119, 2134, 2170, 2201, 2234, 2263, 2275, 2295, 2319, 2343, 2364, 2388, 2407, 2428, 2445, 2455, 2478, 2500, 2526, 2547, 2565, 2592, 2623, 2650, 2671, 2692, 2716, 2741, 2769, 2797, 2813, 2836, 2866, 2877, 2889, 2906, 2921, 2939, 2968, 2985, 3001, 3017, 3035, 3053, 3076, 3097, 3120, 3131, 3147, 3170, 3187, 3215, 3234, 3264, 3284, 3301, 3319, 3336, 3350, 3385, 3404, 3415, 3428, 3443, 3466, 3482, 3500, 3518, 3532, 3549, 3580, 3600, 3621, 3642, 3661, 3680, 3698, 3721, 3745, 3769, 3794, 3829, 3854, 3888, 3921, 3945, 3966, 3980, 4009, 4032, 4059, 4093, 4125, 4155, 4178, 4206, 4234, 4258, 4282, 4311, 4329, 4346, 4368, 4385, 4403, 4423, 4449, 4465, 4484, 4505, 4509, 4527, 4544, 4570, 4584, 4608, 4629, 4644, 4662, 4685, 4700, 4719, 4736, 4753, 4777, 4804, 4827, 4850, 4867, 4889, 4905, 4925, 4944, 4966, 4987, 5007, 5029, 5053, 5072, 5114, 5135, 5158, 5179, 5210, 5229, 5251, 5271, 5297, 5318, 5340, 5360, 5384, 5407, 5426, 5446, 5468, 5491, 5522, 5560, 5601, 5631, 5645, 5666, 5682, 5704, 5734, 5760, 5788, 5821, 5839, 5862, 5897, 5937, 5979, 6011, 6028, 6053, 6068, 6085, 6095, 6106, 6144, 6198, 6244, 6296, 6344, 6387, 6431, 6459, 6473, 6491, 6527, 6550, 6573, 6595, 6623, 6646, 6664, 6691, 6723, 6738, 6754, 6771, 6784} +var _APIErrorCode_index = [...]uint16{0, 4, 16, 25, 39, 53, 67, 81, 94, 112, 129, 146, 159, 171, 193, 213, 239, 253, 274, 291, 306, 329, 346, 364, 381, 405, 420, 441, 459, 471, 491, 508, 531, 552, 564, 582, 603, 631, 661, 682, 705, 731, 768, 798, 831, 856, 888, 918, 947, 972, 994, 1020, 1042, 1070, 1099, 1133, 1164, 1201, 1225, 1249, 1277, 1307, 1316, 1328, 1344, 1357, 1371, 1389, 1409, 1430, 1446, 1457, 1473, 1484, 1512, 1532, 1548, 1576, 1590, 1607, 1627, 1640, 1654, 1667, 1680, 1696, 1713, 1734, 1748, 1769, 1782, 1804, 1827, 1843, 1858, 1873, 1894, 1912, 1927, 1944, 1969, 1987, 2010, 2025, 2044, 2060, 2079, 2093, 2101, 2120, 2130, 2145, 2181, 2212, 2245, 2274, 2286, 2306, 2330, 2354, 2375, 2399, 2418, 2439, 2456, 2466, 2489, 2511, 2537, 2558, 2576, 2603, 2634, 2661, 2682, 2703, 2727, 2752, 2780, 2808, 2824, 2847, 2877, 2888, 2900, 2917, 2932, 2950, 2979, 2996, 3012, 3028, 3046, 3064, 3087, 3108, 3131, 3142, 3158, 3181, 3198, 3226, 3245, 3275, 3295, 3312, 3330, 3347, 3361, 3396, 3415, 3426, 3439, 3454, 3477, 3493, 3511, 3529, 3543, 3560, 3591, 3611, 3632, 3653, 3672, 3691, 3709, 3732, 3756, 3780, 3805, 3840, 3865, 3899, 3932, 3956, 3977, 3991, 4020, 4043, 4070, 4104, 4136, 4166, 4189, 4217, 4245, 4269, 4293, 4322, 4340, 4357, 4379, 4396, 4414, 4434, 4460, 4476, 4495, 4516, 4520, 4538, 4555, 4581, 4595, 4619, 4640, 4655, 4673, 4696, 4711, 4730, 4747, 4764, 4788, 4815, 4838, 4861, 4878, 4900, 4916, 4936, 4955, 4977, 4998, 5018, 5040, 5064, 5083, 5125, 5146, 5169, 5190, 5221, 5240, 5262, 5282, 5308, 5329, 5351, 5371, 5395, 5418, 5437, 5457, 5479, 5502, 5533, 5571, 5612, 5642, 5656, 5677, 5693, 5715, 5745, 5771, 5799, 5832, 5850, 5873, 5908, 5948, 5990, 6022, 6039, 6064, 6079, 6096, 6106, 6117, 6155, 6209, 6255, 6307, 6355, 6398, 6442, 6470, 6484, 6502, 6538, 6561, 6584, 6606, 6634, 6657, 6675, 6702, 6734, 6749, 6765, 6782, 6795} func (i APIErrorCode) String() string { if i < 0 || i >= APIErrorCode(len(_APIErrorCode_index)-1) { diff --git a/cmd/object-multipart-handlers.go b/cmd/object-multipart-handlers.go index 76c28cd19..4653d4e06 100644 --- a/cmd/object-multipart-handlers.go +++ b/cmd/object-multipart-handlers.go @@ -878,12 +878,6 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite return } - // Content-Length is required and should be non-zero - if r.ContentLength <= 0 { - writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingContentLength), r.URL) - return - } - // Get upload id. uploadID, _, _, _, s3Error := getObjectResources(r.Form) if s3Error != ErrNone { @@ -891,15 +885,22 @@ func (api objectAPIHandlers) CompleteMultipartUploadHandler(w http.ResponseWrite return } + // Content-Length is required and should be non-zero + if r.ContentLength <= 0 { + writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingPart), r.URL) + return + } + complMultipartUpload := &CompleteMultipartUpload{} if err = xmlDecoder(r.Body, complMultipartUpload, r.ContentLength); err != nil { writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL) return } if len(complMultipartUpload.Parts) == 0 { - writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMalformedXML), r.URL) + writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMissingPart), r.URL) return } + if !sort.SliceIsSorted(complMultipartUpload.Parts, func(i, j int) bool { return complMultipartUpload.Parts[i].PartNumber < complMultipartUpload.Parts[j].PartNumber }) {