Commit 0d0ba3e2 authored by Nugine's avatar Nugine
Browse files

fix(data): update crawler

parent 65138ddf
Loading
Loading
Loading
Loading
+164 −153
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ use hyper::StatusCode;
// InvalidPolicyDocument
// InvalidQuoteFields
// InvalidRange
// InvalidRegion
// InvalidRequest
// InvalidRequestParameter
// InvalidSOAPRequest
@@ -754,6 +755,12 @@ pub enum S3ErrorCode {
    ///
    InvalidRange,

    /// You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to.
    ///
    /// HTTP Status Code: 403 Forbidden
    ///
    InvalidRegion,

    /// + Please use <code>AWS4-HMAC-SHA256</code>.
    /// + SOAP requests must be made over an HTTPS connection.
    /// + Amazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names.
@@ -1766,6 +1773,7 @@ impl S3ErrorCode {
        "InvalidPolicyDocument",
        "InvalidQuoteFields",
        "InvalidRange",
        "InvalidRegion",
        "InvalidRequest",
        "InvalidRequestParameter",
        "InvalidSOAPRequest",
@@ -2008,159 +2016,160 @@ impl S3ErrorCode {
            Self::InvalidPolicyDocument => 81,
            Self::InvalidQuoteFields => 82,
            Self::InvalidRange => 83,
            Self::InvalidRequest => 84,
            Self::InvalidRequestParameter => 85,
            Self::InvalidSOAPRequest => 86,
            Self::InvalidScanRange => 87,
            Self::InvalidSecurity => 88,
            Self::InvalidSessionException => 89,
            Self::InvalidSignature => 90,
            Self::InvalidStorageClass => 91,
            Self::InvalidTableAlias => 92,
            Self::InvalidTag => 93,
            Self::InvalidTargetBucketForLogging => 94,
            Self::InvalidTextEncoding => 95,
            Self::InvalidToken => 96,
            Self::InvalidURI => 97,
            Self::JSONParsingError => 98,
            Self::KeyTooLongError => 99,
            Self::LexerInvalidChar => 100,
            Self::LexerInvalidIONLiteral => 101,
            Self::LexerInvalidLiteral => 102,
            Self::LexerInvalidOperator => 103,
            Self::LikeInvalidInputs => 104,
            Self::MalformedACLError => 105,
            Self::MalformedPOSTRequest => 106,
            Self::MalformedPolicy => 107,
            Self::MalformedXML => 108,
            Self::MaxMessageLengthExceeded => 109,
            Self::MaxOperatorsExceeded => 110,
            Self::MaxPostPreDataLengthExceededError => 111,
            Self::MetadataTooLarge => 112,
            Self::MethodNotAllowed => 113,
            Self::MissingAttachment => 114,
            Self::MissingAuthenticationToken => 115,
            Self::MissingContentLength => 116,
            Self::MissingRequestBodyError => 117,
            Self::MissingRequiredParameter => 118,
            Self::MissingSecurityElement => 119,
            Self::MissingSecurityHeader => 120,
            Self::MultipleDataSourcesUnsupported => 121,
            Self::NoLoggingStatusForKey => 122,
            Self::NoSuchAccessPoint => 123,
            Self::NoSuchAsyncRequest => 124,
            Self::NoSuchBucket => 125,
            Self::NoSuchBucketPolicy => 126,
            Self::NoSuchCORSConfiguration => 127,
            Self::NoSuchKey => 128,
            Self::NoSuchLifecycleConfiguration => 129,
            Self::NoSuchMultiRegionAccessPoint => 130,
            Self::NoSuchObjectLockConfiguration => 131,
            Self::NoSuchResource => 132,
            Self::NoSuchTagSet => 133,
            Self::NoSuchUpload => 134,
            Self::NoSuchVersion => 135,
            Self::NoSuchWebsiteConfiguration => 136,
            Self::NoTransformationDefined => 137,
            Self::NotDeviceOwnerError => 138,
            Self::NotImplemented => 139,
            Self::NotModified => 140,
            Self::NotSignedUp => 141,
            Self::NumberFormatError => 142,
            Self::ObjectLockConfigurationNotFoundError => 143,
            Self::ObjectSerializationConflict => 144,
            Self::OperationAborted => 145,
            Self::OverMaxColumn => 146,
            Self::OverMaxParquetBlockSize => 147,
            Self::OverMaxRecordSize => 148,
            Self::OwnershipControlsNotFoundError => 149,
            Self::ParquetParsingError => 150,
            Self::ParquetUnsupportedCompressionCodec => 151,
            Self::ParseAsteriskIsNotAloneInSelectList => 152,
            Self::ParseCannotMixSqbAndWildcardInSelectList => 153,
            Self::ParseCastArity => 154,
            Self::ParseEmptySelect => 155,
            Self::ParseExpected2TokenTypes => 156,
            Self::ParseExpectedArgumentDelimiter => 157,
            Self::ParseExpectedDatePart => 158,
            Self::ParseExpectedExpression => 159,
            Self::ParseExpectedIdentForAlias => 160,
            Self::ParseExpectedIdentForAt => 161,
            Self::ParseExpectedIdentForGroupName => 162,
            Self::ParseExpectedKeyword => 163,
            Self::ParseExpectedLeftParenAfterCast => 164,
            Self::ParseExpectedLeftParenBuiltinFunctionCall => 165,
            Self::ParseExpectedLeftParenValueConstructor => 166,
            Self::ParseExpectedMember => 167,
            Self::ParseExpectedNumber => 168,
            Self::ParseExpectedRightParenBuiltinFunctionCall => 169,
            Self::ParseExpectedTokenType => 170,
            Self::ParseExpectedTypeName => 171,
            Self::ParseExpectedWhenClause => 172,
            Self::ParseInvalidContextForWildcardInSelectList => 173,
            Self::ParseInvalidPathComponent => 174,
            Self::ParseInvalidTypeParam => 175,
            Self::ParseMalformedJoin => 176,
            Self::ParseMissingIdentAfterAt => 177,
            Self::ParseNonUnaryAgregateFunctionCall => 178,
            Self::ParseSelectMissingFrom => 179,
            Self::ParseUnExpectedKeyword => 180,
            Self::ParseUnexpectedOperator => 181,
            Self::ParseUnexpectedTerm => 182,
            Self::ParseUnexpectedToken => 183,
            Self::ParseUnknownOperator => 184,
            Self::ParseUnsupportedAlias => 185,
            Self::ParseUnsupportedCallWithStar => 186,
            Self::ParseUnsupportedCase => 187,
            Self::ParseUnsupportedCaseClause => 188,
            Self::ParseUnsupportedLiteralsGroupBy => 189,
            Self::ParseUnsupportedSelect => 190,
            Self::ParseUnsupportedSyntax => 191,
            Self::ParseUnsupportedToken => 192,
            Self::PermanentRedirect => 193,
            Self::PermanentRedirectControlError => 194,
            Self::PreconditionFailed => 195,
            Self::Redirect => 196,
            Self::ReplicationConfigurationNotFoundError => 197,
            Self::RequestHeaderSectionTooLarge => 198,
            Self::RequestIsNotMultiPartContent => 199,
            Self::RequestTimeTooSkewed => 200,
            Self::RequestTimeout => 201,
            Self::RequestTorrentOfBucketError => 202,
            Self::ResponseInterrupted => 203,
            Self::RestoreAlreadyInProgress => 204,
            Self::ServerSideEncryptionConfigurationNotFoundError => 205,
            Self::ServiceUnavailable => 206,
            Self::SignatureDoesNotMatch => 207,
            Self::SlowDown => 208,
            Self::TemporaryRedirect => 209,
            Self::TokenCodeInvalidError => 210,
            Self::TokenRefreshRequired => 211,
            Self::TooManyAccessPoints => 212,
            Self::TooManyBuckets => 213,
            Self::TooManyMultiRegionAccessPointregionsError => 214,
            Self::TooManyMultiRegionAccessPoints => 215,
            Self::TooManyTags => 216,
            Self::TruncatedInput => 217,
            Self::UnauthorizedAccess => 218,
            Self::UnauthorizedAccessError => 219,
            Self::UnexpectedContent => 220,
            Self::UnexpectedIPError => 221,
            Self::UnrecognizedFormatException => 222,
            Self::UnresolvableGrantByEmailAddress => 223,
            Self::UnsupportedArgument => 224,
            Self::UnsupportedFunction => 225,
            Self::UnsupportedParquetType => 226,
            Self::UnsupportedRangeHeader => 227,
            Self::UnsupportedScanRangeInput => 228,
            Self::UnsupportedSignature => 229,
            Self::UnsupportedSqlOperation => 230,
            Self::UnsupportedSqlStructure => 231,
            Self::UnsupportedStorageClass => 232,
            Self::UnsupportedSyntax => 233,
            Self::UnsupportedTypeForQuerying => 234,
            Self::UserKeyMustBeSpecified => 235,
            Self::ValueParseFailure => 236,
            Self::InvalidRegion => 84,
            Self::InvalidRequest => 85,
            Self::InvalidRequestParameter => 86,
            Self::InvalidSOAPRequest => 87,
            Self::InvalidScanRange => 88,
            Self::InvalidSecurity => 89,
            Self::InvalidSessionException => 90,
            Self::InvalidSignature => 91,
            Self::InvalidStorageClass => 92,
            Self::InvalidTableAlias => 93,
            Self::InvalidTag => 94,
            Self::InvalidTargetBucketForLogging => 95,
            Self::InvalidTextEncoding => 96,
            Self::InvalidToken => 97,
            Self::InvalidURI => 98,
            Self::JSONParsingError => 99,
            Self::KeyTooLongError => 100,
            Self::LexerInvalidChar => 101,
            Self::LexerInvalidIONLiteral => 102,
            Self::LexerInvalidLiteral => 103,
            Self::LexerInvalidOperator => 104,
            Self::LikeInvalidInputs => 105,
            Self::MalformedACLError => 106,
            Self::MalformedPOSTRequest => 107,
            Self::MalformedPolicy => 108,
            Self::MalformedXML => 109,
            Self::MaxMessageLengthExceeded => 110,
            Self::MaxOperatorsExceeded => 111,
            Self::MaxPostPreDataLengthExceededError => 112,
            Self::MetadataTooLarge => 113,
            Self::MethodNotAllowed => 114,
            Self::MissingAttachment => 115,
            Self::MissingAuthenticationToken => 116,
            Self::MissingContentLength => 117,
            Self::MissingRequestBodyError => 118,
            Self::MissingRequiredParameter => 119,
            Self::MissingSecurityElement => 120,
            Self::MissingSecurityHeader => 121,
            Self::MultipleDataSourcesUnsupported => 122,
            Self::NoLoggingStatusForKey => 123,
            Self::NoSuchAccessPoint => 124,
            Self::NoSuchAsyncRequest => 125,
            Self::NoSuchBucket => 126,
            Self::NoSuchBucketPolicy => 127,
            Self::NoSuchCORSConfiguration => 128,
            Self::NoSuchKey => 129,
            Self::NoSuchLifecycleConfiguration => 130,
            Self::NoSuchMultiRegionAccessPoint => 131,
            Self::NoSuchObjectLockConfiguration => 132,
            Self::NoSuchResource => 133,
            Self::NoSuchTagSet => 134,
            Self::NoSuchUpload => 135,
            Self::NoSuchVersion => 136,
            Self::NoSuchWebsiteConfiguration => 137,
            Self::NoTransformationDefined => 138,
            Self::NotDeviceOwnerError => 139,
            Self::NotImplemented => 140,
            Self::NotModified => 141,
            Self::NotSignedUp => 142,
            Self::NumberFormatError => 143,
            Self::ObjectLockConfigurationNotFoundError => 144,
            Self::ObjectSerializationConflict => 145,
            Self::OperationAborted => 146,
            Self::OverMaxColumn => 147,
            Self::OverMaxParquetBlockSize => 148,
            Self::OverMaxRecordSize => 149,
            Self::OwnershipControlsNotFoundError => 150,
            Self::ParquetParsingError => 151,
            Self::ParquetUnsupportedCompressionCodec => 152,
            Self::ParseAsteriskIsNotAloneInSelectList => 153,
            Self::ParseCannotMixSqbAndWildcardInSelectList => 154,
            Self::ParseCastArity => 155,
            Self::ParseEmptySelect => 156,
            Self::ParseExpected2TokenTypes => 157,
            Self::ParseExpectedArgumentDelimiter => 158,
            Self::ParseExpectedDatePart => 159,
            Self::ParseExpectedExpression => 160,
            Self::ParseExpectedIdentForAlias => 161,
            Self::ParseExpectedIdentForAt => 162,
            Self::ParseExpectedIdentForGroupName => 163,
            Self::ParseExpectedKeyword => 164,
            Self::ParseExpectedLeftParenAfterCast => 165,
            Self::ParseExpectedLeftParenBuiltinFunctionCall => 166,
            Self::ParseExpectedLeftParenValueConstructor => 167,
            Self::ParseExpectedMember => 168,
            Self::ParseExpectedNumber => 169,
            Self::ParseExpectedRightParenBuiltinFunctionCall => 170,
            Self::ParseExpectedTokenType => 171,
            Self::ParseExpectedTypeName => 172,
            Self::ParseExpectedWhenClause => 173,
            Self::ParseInvalidContextForWildcardInSelectList => 174,
            Self::ParseInvalidPathComponent => 175,
            Self::ParseInvalidTypeParam => 176,
            Self::ParseMalformedJoin => 177,
            Self::ParseMissingIdentAfterAt => 178,
            Self::ParseNonUnaryAgregateFunctionCall => 179,
            Self::ParseSelectMissingFrom => 180,
            Self::ParseUnExpectedKeyword => 181,
            Self::ParseUnexpectedOperator => 182,
            Self::ParseUnexpectedTerm => 183,
            Self::ParseUnexpectedToken => 184,
            Self::ParseUnknownOperator => 185,
            Self::ParseUnsupportedAlias => 186,
            Self::ParseUnsupportedCallWithStar => 187,
            Self::ParseUnsupportedCase => 188,
            Self::ParseUnsupportedCaseClause => 189,
            Self::ParseUnsupportedLiteralsGroupBy => 190,
            Self::ParseUnsupportedSelect => 191,
            Self::ParseUnsupportedSyntax => 192,
            Self::ParseUnsupportedToken => 193,
            Self::PermanentRedirect => 194,
            Self::PermanentRedirectControlError => 195,
            Self::PreconditionFailed => 196,
            Self::Redirect => 197,
            Self::ReplicationConfigurationNotFoundError => 198,
            Self::RequestHeaderSectionTooLarge => 199,
            Self::RequestIsNotMultiPartContent => 200,
            Self::RequestTimeTooSkewed => 201,
            Self::RequestTimeout => 202,
            Self::RequestTorrentOfBucketError => 203,
            Self::ResponseInterrupted => 204,
            Self::RestoreAlreadyInProgress => 205,
            Self::ServerSideEncryptionConfigurationNotFoundError => 206,
            Self::ServiceUnavailable => 207,
            Self::SignatureDoesNotMatch => 208,
            Self::SlowDown => 209,
            Self::TemporaryRedirect => 210,
            Self::TokenCodeInvalidError => 211,
            Self::TokenRefreshRequired => 212,
            Self::TooManyAccessPoints => 213,
            Self::TooManyBuckets => 214,
            Self::TooManyMultiRegionAccessPointregionsError => 215,
            Self::TooManyMultiRegionAccessPoints => 216,
            Self::TooManyTags => 217,
            Self::TruncatedInput => 218,
            Self::UnauthorizedAccess => 219,
            Self::UnauthorizedAccessError => 220,
            Self::UnexpectedContent => 221,
            Self::UnexpectedIPError => 222,
            Self::UnrecognizedFormatException => 223,
            Self::UnresolvableGrantByEmailAddress => 224,
            Self::UnsupportedArgument => 225,
            Self::UnsupportedFunction => 226,
            Self::UnsupportedParquetType => 227,
            Self::UnsupportedRangeHeader => 228,
            Self::UnsupportedScanRangeInput => 229,
            Self::UnsupportedSignature => 230,
            Self::UnsupportedSqlOperation => 231,
            Self::UnsupportedSqlStructure => 232,
            Self::UnsupportedStorageClass => 233,
            Self::UnsupportedSyntax => 234,
            Self::UnsupportedTypeForQuerying => 235,
            Self::UserKeyMustBeSpecified => 236,
            Self::ValueParseFailure => 237,
            Self::Custom(_) => usize::MAX,
        }
    }
@@ -2260,6 +2269,7 @@ impl S3ErrorCode {
            b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument),
            b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields),
            b"InvalidRange" => Some(Self::InvalidRange),
            b"InvalidRegion" => Some(Self::InvalidRegion),
            b"InvalidRequest" => Some(Self::InvalidRequest),
            b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter),
            b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest),
@@ -2505,6 +2515,7 @@ impl S3ErrorCode {
            Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST),
            Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST),
            Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE),
            Self::InvalidRegion => Some(StatusCode::FORBIDDEN),
            Self::InvalidRequest => Some(StatusCode::BAD_REQUEST),
            Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST),
            Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST),
+6 −1
Original line number Diff line number Diff line
@@ -76,7 +76,12 @@ def crawl_error_codes():

        ans = []
        for td_list in tr_list:
            t0 = td_list[0].css.select("code")[0].text.strip()
            td0_code = td_list[0].css.select("code")
            if td0_code:
                t0 = td0_code[0].text.strip()
            else:
                t0 = td_list[0].text.strip()

            t1 = td_list[1].text.strip()
            t2 = td_list[2].text.strip()

+6 −1
Original line number Diff line number Diff line
@@ -252,9 +252,14 @@
        },
        {
            "code": "InvalidRange",
            "description": "The requested range is not valid for the request. Try another range.",
            "description": "The requested range cannot be satisfied.",
            "http_status_code": 416
        },
        {
            "code": "InvalidRegion",
            "description": "You've attempted to create a Multi-Region Access Point in a Region that you haven't opted in to.",
            "http_status_code": 403
        },
        {
            "code": "InvalidRequest",
            "description": "This error might occur for the following reasons:\n\n\nAn unpaginated ListBuckets request is made from an account that has an approved general purpose bucket quota higher than 10,000. You must make paginated requests to list the buckets in an account with more than 10,000 buckets.\n\nThe request is using the wrong signature version. Use AWS4-HMAC-SHA256 (Signature Version 4).\n\nAn access point can be created only for an existing bucket.\n\nThe access point is not in a state where it can be deleted.\n\nAn access point can be listed only for an existing bucket.\n\nThe next token is not valid.\n\nAt least one action must be specified in a lifecycle rule.\n\nAt least one lifecycle rule must be specified.\n\nThe number of lifecycle rules must not exceed the allowed limit of 1000 rules.\n\nThe range for the MaxResults parameter is not valid.\n\nSOAP requests must be made over an HTTPS connection.\n\nAmazon S3 Transfer Acceleration is not supported for buckets with non-DNS compliant names.\n\nAmazon S3 Transfer Acceleration is not supported for buckets with periods (.) in their names.\n\nThe Amazon S3 Transfer Acceleration endpoint supports only virtual style requests.\n\nAmazon S3 Transfer Acceleration is not configured on this bucket.\n\nAmazon S3 Transfer Acceleration is disabled on this bucket.\n\nAmazon S3 Transfer Acceleration is not supported on this bucket. For assistance, contact Support.\n\nAmazon S3 Transfer Acceleration cannot be enabled on this bucket. For assistance, contact Support.\n\n Conflicting values provided in HTTP headers and query parameters. \n\n Conflicting values provided in HTTP headers and POST form fields. \n\nCopyObject request made on objects larger than 5GB in size.",