1#![allow(clippy::doc_markdown)]
4#![allow(clippy::too_many_lines)]
5
6use bytestring::ByteString;
7use hyper::StatusCode;
8
9#[derive(Debug, Clone, PartialEq, Eq)]
248#[non_exhaustive]
249pub enum S3ErrorCode {
250 AccessControlListNotSupported,
255
256 AccessDenied,
261
262 AccessPointAlreadyOwnedByYou,
267
268 AccountProblem,
273
274 AllAccessDisabled,
279
280 AmbiguousFieldName,
285
286 AmbiguousGrantByEmailAddress,
291
292 AuthorizationHeaderMalformed,
297
298 AuthorizationQueryParametersError,
303
304 BadDigest,
309
310 BucketAlreadyExists,
315
316 BucketAlreadyOwnedByYou,
321
322 BucketHasAccessPointsAttached,
327
328 BucketNotEmpty,
333
334 Busy,
339
340 CSVEscapingRecordDelimiter,
345
346 CSVParsingError,
351
352 CSVUnescapedQuote,
357
358 CastFailed,
363
364 ClientTokenConflict,
369
370 ColumnTooLong,
375
376 ConditionalRequestConflict,
381
382 ConnectionClosedByRequester,
387
388 CredentialsNotSupported,
393
394 CrossLocationLoggingProhibited,
399
400 DeviceNotActiveError,
405
406 EmptyRequestBody,
411
412 EndpointNotFound,
417
418 EntityTooLarge,
423
424 EntityTooSmall,
429
430 EvaluatorBindingDoesNotExist,
435
436 EvaluatorInvalidArguments,
441
442 EvaluatorInvalidTimestampFormatPattern,
447
448 EvaluatorInvalidTimestampFormatPatternSymbol,
453
454 EvaluatorInvalidTimestampFormatPatternSymbolForParsing,
459
460 EvaluatorInvalidTimestampFormatPatternToken,
465
466 EvaluatorLikePatternInvalidEscapeSequence,
471
472 EvaluatorNegativeLimit,
477
478 EvaluatorTimestampFormatPatternDuplicateFields,
483
484 EvaluatorTimestampFormatPatternHourClockAmPmMismatch,
489
490 EvaluatorUnterminatedTimestampFormatPatternToken,
495
496 ExpiredToken,
501
502 ExpressionTooLong,
507
508 ExternalEvalException,
513
514 IllegalLocationConstraintException,
524
525 IllegalSqlFunctionArgument,
530
531 IllegalVersioningConfigurationException,
536
537 IncompleteBody,
542
543 IncorrectEndpoint,
548
549 IncorrectNumberOfFilesInPostRequest,
554
555 IncorrectSqlFunctionArgumentType,
560
561 InlineDataTooLarge,
566
567 IntegerOverflow,
572
573 InternalError,
578
579 InvalidAccessKeyId,
584
585 InvalidAccessPoint,
590
591 InvalidAccessPointAliasError,
596
597 InvalidAddressingHeader,
600
601 InvalidArgument,
606
607 InvalidBucketAclWithObjectOwnership,
612
613 InvalidBucketName,
618
619 InvalidBucketOwnerAWSAccountID,
624
625 InvalidBucketState,
630
631 InvalidCast,
636
637 InvalidColumnIndex,
642
643 InvalidCompressionFormat,
648
649 InvalidDataSource,
654
655 InvalidDataType,
660
661 InvalidDigest,
666
667 InvalidEncryptionAlgorithmError,
672
673 InvalidExpressionType,
678
679 InvalidFileHeaderInfo,
684
685 InvalidHostHeader,
690
691 InvalidHttpMethod,
696
697 InvalidJsonType,
702
703 InvalidKeyPath,
708
709 InvalidLocationConstraint,
714
715 InvalidObjectState,
720
721 InvalidPart,
726
727 InvalidPartOrder,
732
733 InvalidPayer,
738
739 InvalidPolicyDocument,
744
745 InvalidQuoteFields,
750
751 InvalidRange,
756
757 InvalidRequest,
769
770 InvalidRequestParameter,
775
776 InvalidSOAPRequest,
781
782 InvalidScanRange,
787
788 InvalidSecurity,
793
794 InvalidSessionException,
799
800 InvalidSignature,
805
806 InvalidStorageClass,
811
812 InvalidTableAlias,
817
818 InvalidTag,
823
824 InvalidTargetBucketForLogging,
829
830 InvalidTextEncoding,
835
836 InvalidToken,
841
842 InvalidURI,
847
848 JSONParsingError,
853
854 KeyTooLongError,
859
860 LexerInvalidChar,
865
866 LexerInvalidIONLiteral,
871
872 LexerInvalidLiteral,
877
878 LexerInvalidOperator,
883
884 LikeInvalidInputs,
889
890 MalformedACLError,
895
896 MalformedPOSTRequest,
901
902 MalformedPolicy,
907
908 MalformedXML,
913
914 MaxMessageLengthExceeded,
919
920 MaxOperatorsExceeded,
925
926 MaxPostPreDataLengthExceededError,
931
932 MetadataTooLarge,
937
938 MethodNotAllowed,
943
944 MissingAttachment,
947
948 MissingAuthenticationToken,
953
954 MissingContentLength,
959
960 MissingRequestBodyError,
965
966 MissingRequiredParameter,
971
972 MissingSecurityElement,
977
978 MissingSecurityHeader,
983
984 MultipleDataSourcesUnsupported,
989
990 NoLoggingStatusForKey,
995
996 NoSuchAccessPoint,
1001
1002 NoSuchAsyncRequest,
1007
1008 NoSuchBucket,
1013
1014 NoSuchBucketPolicy,
1019
1020 NoSuchCORSConfiguration,
1025
1026 NoSuchKey,
1031
1032 NoSuchLifecycleConfiguration,
1037
1038 NoSuchMultiRegionAccessPoint,
1043
1044 NoSuchObjectLockConfiguration,
1049
1050 NoSuchResource,
1055
1056 NoSuchTagSet,
1061
1062 NoSuchUpload,
1067
1068 NoSuchVersion,
1073
1074 NoSuchWebsiteConfiguration,
1079
1080 NoTransformationDefined,
1085
1086 NotDeviceOwnerError,
1091
1092 NotImplemented,
1097
1098 NotModified,
1103
1104 NotSignedUp,
1109
1110 NumberFormatError,
1115
1116 ObjectLockConfigurationNotFoundError,
1121
1122 ObjectSerializationConflict,
1127
1128 OperationAborted,
1133
1134 OverMaxColumn,
1139
1140 OverMaxParquetBlockSize,
1145
1146 OverMaxRecordSize,
1151
1152 OwnershipControlsNotFoundError,
1157
1158 ParquetParsingError,
1163
1164 ParquetUnsupportedCompressionCodec,
1169
1170 ParseAsteriskIsNotAloneInSelectList,
1175
1176 ParseCannotMixSqbAndWildcardInSelectList,
1181
1182 ParseCastArity,
1187
1188 ParseEmptySelect,
1193
1194 ParseExpected2TokenTypes,
1199
1200 ParseExpectedArgumentDelimiter,
1205
1206 ParseExpectedDatePart,
1211
1212 ParseExpectedExpression,
1217
1218 ParseExpectedIdentForAlias,
1223
1224 ParseExpectedIdentForAt,
1229
1230 ParseExpectedIdentForGroupName,
1235
1236 ParseExpectedKeyword,
1241
1242 ParseExpectedLeftParenAfterCast,
1247
1248 ParseExpectedLeftParenBuiltinFunctionCall,
1253
1254 ParseExpectedLeftParenValueConstructor,
1259
1260 ParseExpectedMember,
1265
1266 ParseExpectedNumber,
1271
1272 ParseExpectedRightParenBuiltinFunctionCall,
1277
1278 ParseExpectedTokenType,
1283
1284 ParseExpectedTypeName,
1289
1290 ParseExpectedWhenClause,
1295
1296 ParseInvalidContextForWildcardInSelectList,
1301
1302 ParseInvalidPathComponent,
1307
1308 ParseInvalidTypeParam,
1313
1314 ParseMalformedJoin,
1319
1320 ParseMissingIdentAfterAt,
1325
1326 ParseNonUnaryAgregateFunctionCall,
1331
1332 ParseSelectMissingFrom,
1337
1338 ParseUnExpectedKeyword,
1343
1344 ParseUnexpectedOperator,
1349
1350 ParseUnexpectedTerm,
1355
1356 ParseUnexpectedToken,
1361
1362 ParseUnknownOperator,
1367
1368 ParseUnsupportedAlias,
1373
1374 ParseUnsupportedCallWithStar,
1379
1380 ParseUnsupportedCase,
1385
1386 ParseUnsupportedCaseClause,
1391
1392 ParseUnsupportedLiteralsGroupBy,
1397
1398 ParseUnsupportedSelect,
1403
1404 ParseUnsupportedSyntax,
1409
1410 ParseUnsupportedToken,
1415
1416 PermanentRedirect,
1421
1422 PermanentRedirectControlError,
1427
1428 PreconditionFailed,
1433
1434 Redirect,
1439
1440 ReplicationConfigurationNotFoundError,
1445
1446 RequestHeaderSectionTooLarge,
1451
1452 RequestIsNotMultiPartContent,
1457
1458 RequestTimeTooSkewed,
1463
1464 RequestTimeout,
1469
1470 RequestTorrentOfBucketError,
1475
1476 ResponseInterrupted,
1481
1482 RestoreAlreadyInProgress,
1487
1488 ServerSideEncryptionConfigurationNotFoundError,
1493
1494 ServiceUnavailable,
1499
1500 SignatureDoesNotMatch,
1505
1506 SlowDown,
1511
1512 TemporaryRedirect,
1517
1518 TokenCodeInvalidError,
1523
1524 TokenRefreshRequired,
1529
1530 TooManyAccessPoints,
1535
1536 TooManyBuckets,
1541
1542 TooManyMultiRegionAccessPointregionsError,
1547
1548 TooManyMultiRegionAccessPoints,
1553
1554 TooManyTags,
1559
1560 TruncatedInput,
1565
1566 UnauthorizedAccess,
1571
1572 UnauthorizedAccessError,
1577
1578 UnexpectedContent,
1583
1584 UnexpectedIPError,
1589
1590 UnrecognizedFormatException,
1595
1596 UnresolvableGrantByEmailAddress,
1601
1602 UnsupportedArgument,
1607
1608 UnsupportedFunction,
1613
1614 UnsupportedParquetType,
1619
1620 UnsupportedRangeHeader,
1625
1626 UnsupportedScanRangeInput,
1631
1632 UnsupportedSignature,
1637
1638 UnsupportedSqlOperation,
1643
1644 UnsupportedSqlStructure,
1649
1650 UnsupportedStorageClass,
1655
1656 UnsupportedSyntax,
1661
1662 UnsupportedTypeForQuerying,
1667
1668 UserKeyMustBeSpecified,
1673
1674 ValueParseFailure,
1679
1680 Custom(ByteString),
1681}
1682
1683impl S3ErrorCode {
1684 const STATIC_CODE_LIST: &'static [&'static str] = &[
1685 "AccessControlListNotSupported",
1686 "AccessDenied",
1687 "AccessPointAlreadyOwnedByYou",
1688 "AccountProblem",
1689 "AllAccessDisabled",
1690 "AmbiguousFieldName",
1691 "AmbiguousGrantByEmailAddress",
1692 "AuthorizationHeaderMalformed",
1693 "AuthorizationQueryParametersError",
1694 "BadDigest",
1695 "BucketAlreadyExists",
1696 "BucketAlreadyOwnedByYou",
1697 "BucketHasAccessPointsAttached",
1698 "BucketNotEmpty",
1699 "Busy",
1700 "CSVEscapingRecordDelimiter",
1701 "CSVParsingError",
1702 "CSVUnescapedQuote",
1703 "CastFailed",
1704 "ClientTokenConflict",
1705 "ColumnTooLong",
1706 "ConditionalRequestConflict",
1707 "ConnectionClosedByRequester",
1708 "CredentialsNotSupported",
1709 "CrossLocationLoggingProhibited",
1710 "DeviceNotActiveError",
1711 "EmptyRequestBody",
1712 "EndpointNotFound",
1713 "EntityTooLarge",
1714 "EntityTooSmall",
1715 "EvaluatorBindingDoesNotExist",
1716 "EvaluatorInvalidArguments",
1717 "EvaluatorInvalidTimestampFormatPattern",
1718 "EvaluatorInvalidTimestampFormatPatternSymbol",
1719 "EvaluatorInvalidTimestampFormatPatternSymbolForParsing",
1720 "EvaluatorInvalidTimestampFormatPatternToken",
1721 "EvaluatorLikePatternInvalidEscapeSequence",
1722 "EvaluatorNegativeLimit",
1723 "EvaluatorTimestampFormatPatternDuplicateFields",
1724 "EvaluatorTimestampFormatPatternHourClockAmPmMismatch",
1725 "EvaluatorUnterminatedTimestampFormatPatternToken",
1726 "ExpiredToken",
1727 "ExpressionTooLong",
1728 "ExternalEvalException",
1729 "IllegalLocationConstraintException",
1730 "IllegalSqlFunctionArgument",
1731 "IllegalVersioningConfigurationException",
1732 "IncompleteBody",
1733 "IncorrectEndpoint",
1734 "IncorrectNumberOfFilesInPostRequest",
1735 "IncorrectSqlFunctionArgumentType",
1736 "InlineDataTooLarge",
1737 "IntegerOverflow",
1738 "InternalError",
1739 "InvalidAccessKeyId",
1740 "InvalidAccessPoint",
1741 "InvalidAccessPointAliasError",
1742 "InvalidAddressingHeader",
1743 "InvalidArgument",
1744 "InvalidBucketAclWithObjectOwnership",
1745 "InvalidBucketName",
1746 "InvalidBucketOwnerAWSAccountID",
1747 "InvalidBucketState",
1748 "InvalidCast",
1749 "InvalidColumnIndex",
1750 "InvalidCompressionFormat",
1751 "InvalidDataSource",
1752 "InvalidDataType",
1753 "InvalidDigest",
1754 "InvalidEncryptionAlgorithmError",
1755 "InvalidExpressionType",
1756 "InvalidFileHeaderInfo",
1757 "InvalidHostHeader",
1758 "InvalidHttpMethod",
1759 "InvalidJsonType",
1760 "InvalidKeyPath",
1761 "InvalidLocationConstraint",
1762 "InvalidObjectState",
1763 "InvalidPart",
1764 "InvalidPartOrder",
1765 "InvalidPayer",
1766 "InvalidPolicyDocument",
1767 "InvalidQuoteFields",
1768 "InvalidRange",
1769 "InvalidRequest",
1770 "InvalidRequestParameter",
1771 "InvalidSOAPRequest",
1772 "InvalidScanRange",
1773 "InvalidSecurity",
1774 "InvalidSessionException",
1775 "InvalidSignature",
1776 "InvalidStorageClass",
1777 "InvalidTableAlias",
1778 "InvalidTag",
1779 "InvalidTargetBucketForLogging",
1780 "InvalidTextEncoding",
1781 "InvalidToken",
1782 "InvalidURI",
1783 "JSONParsingError",
1784 "KeyTooLongError",
1785 "LexerInvalidChar",
1786 "LexerInvalidIONLiteral",
1787 "LexerInvalidLiteral",
1788 "LexerInvalidOperator",
1789 "LikeInvalidInputs",
1790 "MalformedACLError",
1791 "MalformedPOSTRequest",
1792 "MalformedPolicy",
1793 "MalformedXML",
1794 "MaxMessageLengthExceeded",
1795 "MaxOperatorsExceeded",
1796 "MaxPostPreDataLengthExceededError",
1797 "MetadataTooLarge",
1798 "MethodNotAllowed",
1799 "MissingAttachment",
1800 "MissingAuthenticationToken",
1801 "MissingContentLength",
1802 "MissingRequestBodyError",
1803 "MissingRequiredParameter",
1804 "MissingSecurityElement",
1805 "MissingSecurityHeader",
1806 "MultipleDataSourcesUnsupported",
1807 "NoLoggingStatusForKey",
1808 "NoSuchAccessPoint",
1809 "NoSuchAsyncRequest",
1810 "NoSuchBucket",
1811 "NoSuchBucketPolicy",
1812 "NoSuchCORSConfiguration",
1813 "NoSuchKey",
1814 "NoSuchLifecycleConfiguration",
1815 "NoSuchMultiRegionAccessPoint",
1816 "NoSuchObjectLockConfiguration",
1817 "NoSuchResource",
1818 "NoSuchTagSet",
1819 "NoSuchUpload",
1820 "NoSuchVersion",
1821 "NoSuchWebsiteConfiguration",
1822 "NoTransformationDefined",
1823 "NotDeviceOwnerError",
1824 "NotImplemented",
1825 "NotModified",
1826 "NotSignedUp",
1827 "NumberFormatError",
1828 "ObjectLockConfigurationNotFoundError",
1829 "ObjectSerializationConflict",
1830 "OperationAborted",
1831 "OverMaxColumn",
1832 "OverMaxParquetBlockSize",
1833 "OverMaxRecordSize",
1834 "OwnershipControlsNotFoundError",
1835 "ParquetParsingError",
1836 "ParquetUnsupportedCompressionCodec",
1837 "ParseAsteriskIsNotAloneInSelectList",
1838 "ParseCannotMixSqbAndWildcardInSelectList",
1839 "ParseCastArity",
1840 "ParseEmptySelect",
1841 "ParseExpected2TokenTypes",
1842 "ParseExpectedArgumentDelimiter",
1843 "ParseExpectedDatePart",
1844 "ParseExpectedExpression",
1845 "ParseExpectedIdentForAlias",
1846 "ParseExpectedIdentForAt",
1847 "ParseExpectedIdentForGroupName",
1848 "ParseExpectedKeyword",
1849 "ParseExpectedLeftParenAfterCast",
1850 "ParseExpectedLeftParenBuiltinFunctionCall",
1851 "ParseExpectedLeftParenValueConstructor",
1852 "ParseExpectedMember",
1853 "ParseExpectedNumber",
1854 "ParseExpectedRightParenBuiltinFunctionCall",
1855 "ParseExpectedTokenType",
1856 "ParseExpectedTypeName",
1857 "ParseExpectedWhenClause",
1858 "ParseInvalidContextForWildcardInSelectList",
1859 "ParseInvalidPathComponent",
1860 "ParseInvalidTypeParam",
1861 "ParseMalformedJoin",
1862 "ParseMissingIdentAfterAt",
1863 "ParseNonUnaryAgregateFunctionCall",
1864 "ParseSelectMissingFrom",
1865 "ParseUnExpectedKeyword",
1866 "ParseUnexpectedOperator",
1867 "ParseUnexpectedTerm",
1868 "ParseUnexpectedToken",
1869 "ParseUnknownOperator",
1870 "ParseUnsupportedAlias",
1871 "ParseUnsupportedCallWithStar",
1872 "ParseUnsupportedCase",
1873 "ParseUnsupportedCaseClause",
1874 "ParseUnsupportedLiteralsGroupBy",
1875 "ParseUnsupportedSelect",
1876 "ParseUnsupportedSyntax",
1877 "ParseUnsupportedToken",
1878 "PermanentRedirect",
1879 "PermanentRedirectControlError",
1880 "PreconditionFailed",
1881 "Redirect",
1882 "ReplicationConfigurationNotFoundError",
1883 "RequestHeaderSectionTooLarge",
1884 "RequestIsNotMultiPartContent",
1885 "RequestTimeTooSkewed",
1886 "RequestTimeout",
1887 "RequestTorrentOfBucketError",
1888 "ResponseInterrupted",
1889 "RestoreAlreadyInProgress",
1890 "ServerSideEncryptionConfigurationNotFoundError",
1891 "ServiceUnavailable",
1892 "SignatureDoesNotMatch",
1893 "SlowDown",
1894 "TemporaryRedirect",
1895 "TokenCodeInvalidError",
1896 "TokenRefreshRequired",
1897 "TooManyAccessPoints",
1898 "TooManyBuckets",
1899 "TooManyMultiRegionAccessPointregionsError",
1900 "TooManyMultiRegionAccessPoints",
1901 "TooManyTags",
1902 "TruncatedInput",
1903 "UnauthorizedAccess",
1904 "UnauthorizedAccessError",
1905 "UnexpectedContent",
1906 "UnexpectedIPError",
1907 "UnrecognizedFormatException",
1908 "UnresolvableGrantByEmailAddress",
1909 "UnsupportedArgument",
1910 "UnsupportedFunction",
1911 "UnsupportedParquetType",
1912 "UnsupportedRangeHeader",
1913 "UnsupportedScanRangeInput",
1914 "UnsupportedSignature",
1915 "UnsupportedSqlOperation",
1916 "UnsupportedSqlStructure",
1917 "UnsupportedStorageClass",
1918 "UnsupportedSyntax",
1919 "UnsupportedTypeForQuerying",
1920 "UserKeyMustBeSpecified",
1921 "ValueParseFailure",
1922 ];
1923
1924 #[must_use]
1925 fn as_enum_tag(&self) -> usize {
1926 match self {
1927 Self::AccessControlListNotSupported => 0,
1928 Self::AccessDenied => 1,
1929 Self::AccessPointAlreadyOwnedByYou => 2,
1930 Self::AccountProblem => 3,
1931 Self::AllAccessDisabled => 4,
1932 Self::AmbiguousFieldName => 5,
1933 Self::AmbiguousGrantByEmailAddress => 6,
1934 Self::AuthorizationHeaderMalformed => 7,
1935 Self::AuthorizationQueryParametersError => 8,
1936 Self::BadDigest => 9,
1937 Self::BucketAlreadyExists => 10,
1938 Self::BucketAlreadyOwnedByYou => 11,
1939 Self::BucketHasAccessPointsAttached => 12,
1940 Self::BucketNotEmpty => 13,
1941 Self::Busy => 14,
1942 Self::CSVEscapingRecordDelimiter => 15,
1943 Self::CSVParsingError => 16,
1944 Self::CSVUnescapedQuote => 17,
1945 Self::CastFailed => 18,
1946 Self::ClientTokenConflict => 19,
1947 Self::ColumnTooLong => 20,
1948 Self::ConditionalRequestConflict => 21,
1949 Self::ConnectionClosedByRequester => 22,
1950 Self::CredentialsNotSupported => 23,
1951 Self::CrossLocationLoggingProhibited => 24,
1952 Self::DeviceNotActiveError => 25,
1953 Self::EmptyRequestBody => 26,
1954 Self::EndpointNotFound => 27,
1955 Self::EntityTooLarge => 28,
1956 Self::EntityTooSmall => 29,
1957 Self::EvaluatorBindingDoesNotExist => 30,
1958 Self::EvaluatorInvalidArguments => 31,
1959 Self::EvaluatorInvalidTimestampFormatPattern => 32,
1960 Self::EvaluatorInvalidTimestampFormatPatternSymbol => 33,
1961 Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => 34,
1962 Self::EvaluatorInvalidTimestampFormatPatternToken => 35,
1963 Self::EvaluatorLikePatternInvalidEscapeSequence => 36,
1964 Self::EvaluatorNegativeLimit => 37,
1965 Self::EvaluatorTimestampFormatPatternDuplicateFields => 38,
1966 Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => 39,
1967 Self::EvaluatorUnterminatedTimestampFormatPatternToken => 40,
1968 Self::ExpiredToken => 41,
1969 Self::ExpressionTooLong => 42,
1970 Self::ExternalEvalException => 43,
1971 Self::IllegalLocationConstraintException => 44,
1972 Self::IllegalSqlFunctionArgument => 45,
1973 Self::IllegalVersioningConfigurationException => 46,
1974 Self::IncompleteBody => 47,
1975 Self::IncorrectEndpoint => 48,
1976 Self::IncorrectNumberOfFilesInPostRequest => 49,
1977 Self::IncorrectSqlFunctionArgumentType => 50,
1978 Self::InlineDataTooLarge => 51,
1979 Self::IntegerOverflow => 52,
1980 Self::InternalError => 53,
1981 Self::InvalidAccessKeyId => 54,
1982 Self::InvalidAccessPoint => 55,
1983 Self::InvalidAccessPointAliasError => 56,
1984 Self::InvalidAddressingHeader => 57,
1985 Self::InvalidArgument => 58,
1986 Self::InvalidBucketAclWithObjectOwnership => 59,
1987 Self::InvalidBucketName => 60,
1988 Self::InvalidBucketOwnerAWSAccountID => 61,
1989 Self::InvalidBucketState => 62,
1990 Self::InvalidCast => 63,
1991 Self::InvalidColumnIndex => 64,
1992 Self::InvalidCompressionFormat => 65,
1993 Self::InvalidDataSource => 66,
1994 Self::InvalidDataType => 67,
1995 Self::InvalidDigest => 68,
1996 Self::InvalidEncryptionAlgorithmError => 69,
1997 Self::InvalidExpressionType => 70,
1998 Self::InvalidFileHeaderInfo => 71,
1999 Self::InvalidHostHeader => 72,
2000 Self::InvalidHttpMethod => 73,
2001 Self::InvalidJsonType => 74,
2002 Self::InvalidKeyPath => 75,
2003 Self::InvalidLocationConstraint => 76,
2004 Self::InvalidObjectState => 77,
2005 Self::InvalidPart => 78,
2006 Self::InvalidPartOrder => 79,
2007 Self::InvalidPayer => 80,
2008 Self::InvalidPolicyDocument => 81,
2009 Self::InvalidQuoteFields => 82,
2010 Self::InvalidRange => 83,
2011 Self::InvalidRequest => 84,
2012 Self::InvalidRequestParameter => 85,
2013 Self::InvalidSOAPRequest => 86,
2014 Self::InvalidScanRange => 87,
2015 Self::InvalidSecurity => 88,
2016 Self::InvalidSessionException => 89,
2017 Self::InvalidSignature => 90,
2018 Self::InvalidStorageClass => 91,
2019 Self::InvalidTableAlias => 92,
2020 Self::InvalidTag => 93,
2021 Self::InvalidTargetBucketForLogging => 94,
2022 Self::InvalidTextEncoding => 95,
2023 Self::InvalidToken => 96,
2024 Self::InvalidURI => 97,
2025 Self::JSONParsingError => 98,
2026 Self::KeyTooLongError => 99,
2027 Self::LexerInvalidChar => 100,
2028 Self::LexerInvalidIONLiteral => 101,
2029 Self::LexerInvalidLiteral => 102,
2030 Self::LexerInvalidOperator => 103,
2031 Self::LikeInvalidInputs => 104,
2032 Self::MalformedACLError => 105,
2033 Self::MalformedPOSTRequest => 106,
2034 Self::MalformedPolicy => 107,
2035 Self::MalformedXML => 108,
2036 Self::MaxMessageLengthExceeded => 109,
2037 Self::MaxOperatorsExceeded => 110,
2038 Self::MaxPostPreDataLengthExceededError => 111,
2039 Self::MetadataTooLarge => 112,
2040 Self::MethodNotAllowed => 113,
2041 Self::MissingAttachment => 114,
2042 Self::MissingAuthenticationToken => 115,
2043 Self::MissingContentLength => 116,
2044 Self::MissingRequestBodyError => 117,
2045 Self::MissingRequiredParameter => 118,
2046 Self::MissingSecurityElement => 119,
2047 Self::MissingSecurityHeader => 120,
2048 Self::MultipleDataSourcesUnsupported => 121,
2049 Self::NoLoggingStatusForKey => 122,
2050 Self::NoSuchAccessPoint => 123,
2051 Self::NoSuchAsyncRequest => 124,
2052 Self::NoSuchBucket => 125,
2053 Self::NoSuchBucketPolicy => 126,
2054 Self::NoSuchCORSConfiguration => 127,
2055 Self::NoSuchKey => 128,
2056 Self::NoSuchLifecycleConfiguration => 129,
2057 Self::NoSuchMultiRegionAccessPoint => 130,
2058 Self::NoSuchObjectLockConfiguration => 131,
2059 Self::NoSuchResource => 132,
2060 Self::NoSuchTagSet => 133,
2061 Self::NoSuchUpload => 134,
2062 Self::NoSuchVersion => 135,
2063 Self::NoSuchWebsiteConfiguration => 136,
2064 Self::NoTransformationDefined => 137,
2065 Self::NotDeviceOwnerError => 138,
2066 Self::NotImplemented => 139,
2067 Self::NotModified => 140,
2068 Self::NotSignedUp => 141,
2069 Self::NumberFormatError => 142,
2070 Self::ObjectLockConfigurationNotFoundError => 143,
2071 Self::ObjectSerializationConflict => 144,
2072 Self::OperationAborted => 145,
2073 Self::OverMaxColumn => 146,
2074 Self::OverMaxParquetBlockSize => 147,
2075 Self::OverMaxRecordSize => 148,
2076 Self::OwnershipControlsNotFoundError => 149,
2077 Self::ParquetParsingError => 150,
2078 Self::ParquetUnsupportedCompressionCodec => 151,
2079 Self::ParseAsteriskIsNotAloneInSelectList => 152,
2080 Self::ParseCannotMixSqbAndWildcardInSelectList => 153,
2081 Self::ParseCastArity => 154,
2082 Self::ParseEmptySelect => 155,
2083 Self::ParseExpected2TokenTypes => 156,
2084 Self::ParseExpectedArgumentDelimiter => 157,
2085 Self::ParseExpectedDatePart => 158,
2086 Self::ParseExpectedExpression => 159,
2087 Self::ParseExpectedIdentForAlias => 160,
2088 Self::ParseExpectedIdentForAt => 161,
2089 Self::ParseExpectedIdentForGroupName => 162,
2090 Self::ParseExpectedKeyword => 163,
2091 Self::ParseExpectedLeftParenAfterCast => 164,
2092 Self::ParseExpectedLeftParenBuiltinFunctionCall => 165,
2093 Self::ParseExpectedLeftParenValueConstructor => 166,
2094 Self::ParseExpectedMember => 167,
2095 Self::ParseExpectedNumber => 168,
2096 Self::ParseExpectedRightParenBuiltinFunctionCall => 169,
2097 Self::ParseExpectedTokenType => 170,
2098 Self::ParseExpectedTypeName => 171,
2099 Self::ParseExpectedWhenClause => 172,
2100 Self::ParseInvalidContextForWildcardInSelectList => 173,
2101 Self::ParseInvalidPathComponent => 174,
2102 Self::ParseInvalidTypeParam => 175,
2103 Self::ParseMalformedJoin => 176,
2104 Self::ParseMissingIdentAfterAt => 177,
2105 Self::ParseNonUnaryAgregateFunctionCall => 178,
2106 Self::ParseSelectMissingFrom => 179,
2107 Self::ParseUnExpectedKeyword => 180,
2108 Self::ParseUnexpectedOperator => 181,
2109 Self::ParseUnexpectedTerm => 182,
2110 Self::ParseUnexpectedToken => 183,
2111 Self::ParseUnknownOperator => 184,
2112 Self::ParseUnsupportedAlias => 185,
2113 Self::ParseUnsupportedCallWithStar => 186,
2114 Self::ParseUnsupportedCase => 187,
2115 Self::ParseUnsupportedCaseClause => 188,
2116 Self::ParseUnsupportedLiteralsGroupBy => 189,
2117 Self::ParseUnsupportedSelect => 190,
2118 Self::ParseUnsupportedSyntax => 191,
2119 Self::ParseUnsupportedToken => 192,
2120 Self::PermanentRedirect => 193,
2121 Self::PermanentRedirectControlError => 194,
2122 Self::PreconditionFailed => 195,
2123 Self::Redirect => 196,
2124 Self::ReplicationConfigurationNotFoundError => 197,
2125 Self::RequestHeaderSectionTooLarge => 198,
2126 Self::RequestIsNotMultiPartContent => 199,
2127 Self::RequestTimeTooSkewed => 200,
2128 Self::RequestTimeout => 201,
2129 Self::RequestTorrentOfBucketError => 202,
2130 Self::ResponseInterrupted => 203,
2131 Self::RestoreAlreadyInProgress => 204,
2132 Self::ServerSideEncryptionConfigurationNotFoundError => 205,
2133 Self::ServiceUnavailable => 206,
2134 Self::SignatureDoesNotMatch => 207,
2135 Self::SlowDown => 208,
2136 Self::TemporaryRedirect => 209,
2137 Self::TokenCodeInvalidError => 210,
2138 Self::TokenRefreshRequired => 211,
2139 Self::TooManyAccessPoints => 212,
2140 Self::TooManyBuckets => 213,
2141 Self::TooManyMultiRegionAccessPointregionsError => 214,
2142 Self::TooManyMultiRegionAccessPoints => 215,
2143 Self::TooManyTags => 216,
2144 Self::TruncatedInput => 217,
2145 Self::UnauthorizedAccess => 218,
2146 Self::UnauthorizedAccessError => 219,
2147 Self::UnexpectedContent => 220,
2148 Self::UnexpectedIPError => 221,
2149 Self::UnrecognizedFormatException => 222,
2150 Self::UnresolvableGrantByEmailAddress => 223,
2151 Self::UnsupportedArgument => 224,
2152 Self::UnsupportedFunction => 225,
2153 Self::UnsupportedParquetType => 226,
2154 Self::UnsupportedRangeHeader => 227,
2155 Self::UnsupportedScanRangeInput => 228,
2156 Self::UnsupportedSignature => 229,
2157 Self::UnsupportedSqlOperation => 230,
2158 Self::UnsupportedSqlStructure => 231,
2159 Self::UnsupportedStorageClass => 232,
2160 Self::UnsupportedSyntax => 233,
2161 Self::UnsupportedTypeForQuerying => 234,
2162 Self::UserKeyMustBeSpecified => 235,
2163 Self::ValueParseFailure => 236,
2164 Self::Custom(_) => usize::MAX,
2165 }
2166 }
2167
2168 pub(crate) fn as_static_str(&self) -> Option<&'static str> {
2169 Self::STATIC_CODE_LIST.get(self.as_enum_tag()).copied()
2170 }
2171
2172 #[must_use]
2173 pub fn from_bytes(s: &[u8]) -> Option<Self> {
2174 match s {
2175 b"AccessControlListNotSupported" => Some(Self::AccessControlListNotSupported),
2176 b"AccessDenied" => Some(Self::AccessDenied),
2177 b"AccessPointAlreadyOwnedByYou" => Some(Self::AccessPointAlreadyOwnedByYou),
2178 b"AccountProblem" => Some(Self::AccountProblem),
2179 b"AllAccessDisabled" => Some(Self::AllAccessDisabled),
2180 b"AmbiguousFieldName" => Some(Self::AmbiguousFieldName),
2181 b"AmbiguousGrantByEmailAddress" => Some(Self::AmbiguousGrantByEmailAddress),
2182 b"AuthorizationHeaderMalformed" => Some(Self::AuthorizationHeaderMalformed),
2183 b"AuthorizationQueryParametersError" => Some(Self::AuthorizationQueryParametersError),
2184 b"BadDigest" => Some(Self::BadDigest),
2185 b"BucketAlreadyExists" => Some(Self::BucketAlreadyExists),
2186 b"BucketAlreadyOwnedByYou" => Some(Self::BucketAlreadyOwnedByYou),
2187 b"BucketHasAccessPointsAttached" => Some(Self::BucketHasAccessPointsAttached),
2188 b"BucketNotEmpty" => Some(Self::BucketNotEmpty),
2189 b"Busy" => Some(Self::Busy),
2190 b"CSVEscapingRecordDelimiter" => Some(Self::CSVEscapingRecordDelimiter),
2191 b"CSVParsingError" => Some(Self::CSVParsingError),
2192 b"CSVUnescapedQuote" => Some(Self::CSVUnescapedQuote),
2193 b"CastFailed" => Some(Self::CastFailed),
2194 b"ClientTokenConflict" => Some(Self::ClientTokenConflict),
2195 b"ColumnTooLong" => Some(Self::ColumnTooLong),
2196 b"ConditionalRequestConflict" => Some(Self::ConditionalRequestConflict),
2197 b"ConnectionClosedByRequester" => Some(Self::ConnectionClosedByRequester),
2198 b"CredentialsNotSupported" => Some(Self::CredentialsNotSupported),
2199 b"CrossLocationLoggingProhibited" => Some(Self::CrossLocationLoggingProhibited),
2200 b"DeviceNotActiveError" => Some(Self::DeviceNotActiveError),
2201 b"EmptyRequestBody" => Some(Self::EmptyRequestBody),
2202 b"EndpointNotFound" => Some(Self::EndpointNotFound),
2203 b"EntityTooLarge" => Some(Self::EntityTooLarge),
2204 b"EntityTooSmall" => Some(Self::EntityTooSmall),
2205 b"EvaluatorBindingDoesNotExist" => Some(Self::EvaluatorBindingDoesNotExist),
2206 b"EvaluatorInvalidArguments" => Some(Self::EvaluatorInvalidArguments),
2207 b"EvaluatorInvalidTimestampFormatPattern" => Some(Self::EvaluatorInvalidTimestampFormatPattern),
2208 b"EvaluatorInvalidTimestampFormatPatternSymbol" => Some(Self::EvaluatorInvalidTimestampFormatPatternSymbol),
2209 b"EvaluatorInvalidTimestampFormatPatternSymbolForParsing" => {
2210 Some(Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing)
2211 }
2212 b"EvaluatorInvalidTimestampFormatPatternToken" => Some(Self::EvaluatorInvalidTimestampFormatPatternToken),
2213 b"EvaluatorLikePatternInvalidEscapeSequence" => Some(Self::EvaluatorLikePatternInvalidEscapeSequence),
2214 b"EvaluatorNegativeLimit" => Some(Self::EvaluatorNegativeLimit),
2215 b"EvaluatorTimestampFormatPatternDuplicateFields" => Some(Self::EvaluatorTimestampFormatPatternDuplicateFields),
2216 b"EvaluatorTimestampFormatPatternHourClockAmPmMismatch" => {
2217 Some(Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch)
2218 }
2219 b"EvaluatorUnterminatedTimestampFormatPatternToken" => Some(Self::EvaluatorUnterminatedTimestampFormatPatternToken),
2220 b"ExpiredToken" => Some(Self::ExpiredToken),
2221 b"ExpressionTooLong" => Some(Self::ExpressionTooLong),
2222 b"ExternalEvalException" => Some(Self::ExternalEvalException),
2223 b"IllegalLocationConstraintException" => Some(Self::IllegalLocationConstraintException),
2224 b"IllegalSqlFunctionArgument" => Some(Self::IllegalSqlFunctionArgument),
2225 b"IllegalVersioningConfigurationException" => Some(Self::IllegalVersioningConfigurationException),
2226 b"IncompleteBody" => Some(Self::IncompleteBody),
2227 b"IncorrectEndpoint" => Some(Self::IncorrectEndpoint),
2228 b"IncorrectNumberOfFilesInPostRequest" => Some(Self::IncorrectNumberOfFilesInPostRequest),
2229 b"IncorrectSqlFunctionArgumentType" => Some(Self::IncorrectSqlFunctionArgumentType),
2230 b"InlineDataTooLarge" => Some(Self::InlineDataTooLarge),
2231 b"IntegerOverflow" => Some(Self::IntegerOverflow),
2232 b"InternalError" => Some(Self::InternalError),
2233 b"InvalidAccessKeyId" => Some(Self::InvalidAccessKeyId),
2234 b"InvalidAccessPoint" => Some(Self::InvalidAccessPoint),
2235 b"InvalidAccessPointAliasError" => Some(Self::InvalidAccessPointAliasError),
2236 b"InvalidAddressingHeader" => Some(Self::InvalidAddressingHeader),
2237 b"InvalidArgument" => Some(Self::InvalidArgument),
2238 b"InvalidBucketAclWithObjectOwnership" => Some(Self::InvalidBucketAclWithObjectOwnership),
2239 b"InvalidBucketName" => Some(Self::InvalidBucketName),
2240 b"InvalidBucketOwnerAWSAccountID" => Some(Self::InvalidBucketOwnerAWSAccountID),
2241 b"InvalidBucketState" => Some(Self::InvalidBucketState),
2242 b"InvalidCast" => Some(Self::InvalidCast),
2243 b"InvalidColumnIndex" => Some(Self::InvalidColumnIndex),
2244 b"InvalidCompressionFormat" => Some(Self::InvalidCompressionFormat),
2245 b"InvalidDataSource" => Some(Self::InvalidDataSource),
2246 b"InvalidDataType" => Some(Self::InvalidDataType),
2247 b"InvalidDigest" => Some(Self::InvalidDigest),
2248 b"InvalidEncryptionAlgorithmError" => Some(Self::InvalidEncryptionAlgorithmError),
2249 b"InvalidExpressionType" => Some(Self::InvalidExpressionType),
2250 b"InvalidFileHeaderInfo" => Some(Self::InvalidFileHeaderInfo),
2251 b"InvalidHostHeader" => Some(Self::InvalidHostHeader),
2252 b"InvalidHttpMethod" => Some(Self::InvalidHttpMethod),
2253 b"InvalidJsonType" => Some(Self::InvalidJsonType),
2254 b"InvalidKeyPath" => Some(Self::InvalidKeyPath),
2255 b"InvalidLocationConstraint" => Some(Self::InvalidLocationConstraint),
2256 b"InvalidObjectState" => Some(Self::InvalidObjectState),
2257 b"InvalidPart" => Some(Self::InvalidPart),
2258 b"InvalidPartOrder" => Some(Self::InvalidPartOrder),
2259 b"InvalidPayer" => Some(Self::InvalidPayer),
2260 b"InvalidPolicyDocument" => Some(Self::InvalidPolicyDocument),
2261 b"InvalidQuoteFields" => Some(Self::InvalidQuoteFields),
2262 b"InvalidRange" => Some(Self::InvalidRange),
2263 b"InvalidRequest" => Some(Self::InvalidRequest),
2264 b"InvalidRequestParameter" => Some(Self::InvalidRequestParameter),
2265 b"InvalidSOAPRequest" => Some(Self::InvalidSOAPRequest),
2266 b"InvalidScanRange" => Some(Self::InvalidScanRange),
2267 b"InvalidSecurity" => Some(Self::InvalidSecurity),
2268 b"InvalidSessionException" => Some(Self::InvalidSessionException),
2269 b"InvalidSignature" => Some(Self::InvalidSignature),
2270 b"InvalidStorageClass" => Some(Self::InvalidStorageClass),
2271 b"InvalidTableAlias" => Some(Self::InvalidTableAlias),
2272 b"InvalidTag" => Some(Self::InvalidTag),
2273 b"InvalidTargetBucketForLogging" => Some(Self::InvalidTargetBucketForLogging),
2274 b"InvalidTextEncoding" => Some(Self::InvalidTextEncoding),
2275 b"InvalidToken" => Some(Self::InvalidToken),
2276 b"InvalidURI" => Some(Self::InvalidURI),
2277 b"JSONParsingError" => Some(Self::JSONParsingError),
2278 b"KeyTooLongError" => Some(Self::KeyTooLongError),
2279 b"LexerInvalidChar" => Some(Self::LexerInvalidChar),
2280 b"LexerInvalidIONLiteral" => Some(Self::LexerInvalidIONLiteral),
2281 b"LexerInvalidLiteral" => Some(Self::LexerInvalidLiteral),
2282 b"LexerInvalidOperator" => Some(Self::LexerInvalidOperator),
2283 b"LikeInvalidInputs" => Some(Self::LikeInvalidInputs),
2284 b"MalformedACLError" => Some(Self::MalformedACLError),
2285 b"MalformedPOSTRequest" => Some(Self::MalformedPOSTRequest),
2286 b"MalformedPolicy" => Some(Self::MalformedPolicy),
2287 b"MalformedXML" => Some(Self::MalformedXML),
2288 b"MaxMessageLengthExceeded" => Some(Self::MaxMessageLengthExceeded),
2289 b"MaxOperatorsExceeded" => Some(Self::MaxOperatorsExceeded),
2290 b"MaxPostPreDataLengthExceededError" => Some(Self::MaxPostPreDataLengthExceededError),
2291 b"MetadataTooLarge" => Some(Self::MetadataTooLarge),
2292 b"MethodNotAllowed" => Some(Self::MethodNotAllowed),
2293 b"MissingAttachment" => Some(Self::MissingAttachment),
2294 b"MissingAuthenticationToken" => Some(Self::MissingAuthenticationToken),
2295 b"MissingContentLength" => Some(Self::MissingContentLength),
2296 b"MissingRequestBodyError" => Some(Self::MissingRequestBodyError),
2297 b"MissingRequiredParameter" => Some(Self::MissingRequiredParameter),
2298 b"MissingSecurityElement" => Some(Self::MissingSecurityElement),
2299 b"MissingSecurityHeader" => Some(Self::MissingSecurityHeader),
2300 b"MultipleDataSourcesUnsupported" => Some(Self::MultipleDataSourcesUnsupported),
2301 b"NoLoggingStatusForKey" => Some(Self::NoLoggingStatusForKey),
2302 b"NoSuchAccessPoint" => Some(Self::NoSuchAccessPoint),
2303 b"NoSuchAsyncRequest" => Some(Self::NoSuchAsyncRequest),
2304 b"NoSuchBucket" => Some(Self::NoSuchBucket),
2305 b"NoSuchBucketPolicy" => Some(Self::NoSuchBucketPolicy),
2306 b"NoSuchCORSConfiguration" => Some(Self::NoSuchCORSConfiguration),
2307 b"NoSuchKey" => Some(Self::NoSuchKey),
2308 b"NoSuchLifecycleConfiguration" => Some(Self::NoSuchLifecycleConfiguration),
2309 b"NoSuchMultiRegionAccessPoint" => Some(Self::NoSuchMultiRegionAccessPoint),
2310 b"NoSuchObjectLockConfiguration" => Some(Self::NoSuchObjectLockConfiguration),
2311 b"NoSuchResource" => Some(Self::NoSuchResource),
2312 b"NoSuchTagSet" => Some(Self::NoSuchTagSet),
2313 b"NoSuchUpload" => Some(Self::NoSuchUpload),
2314 b"NoSuchVersion" => Some(Self::NoSuchVersion),
2315 b"NoSuchWebsiteConfiguration" => Some(Self::NoSuchWebsiteConfiguration),
2316 b"NoTransformationDefined" => Some(Self::NoTransformationDefined),
2317 b"NotDeviceOwnerError" => Some(Self::NotDeviceOwnerError),
2318 b"NotImplemented" => Some(Self::NotImplemented),
2319 b"NotModified" => Some(Self::NotModified),
2320 b"NotSignedUp" => Some(Self::NotSignedUp),
2321 b"NumberFormatError" => Some(Self::NumberFormatError),
2322 b"ObjectLockConfigurationNotFoundError" => Some(Self::ObjectLockConfigurationNotFoundError),
2323 b"ObjectSerializationConflict" => Some(Self::ObjectSerializationConflict),
2324 b"OperationAborted" => Some(Self::OperationAborted),
2325 b"OverMaxColumn" => Some(Self::OverMaxColumn),
2326 b"OverMaxParquetBlockSize" => Some(Self::OverMaxParquetBlockSize),
2327 b"OverMaxRecordSize" => Some(Self::OverMaxRecordSize),
2328 b"OwnershipControlsNotFoundError" => Some(Self::OwnershipControlsNotFoundError),
2329 b"ParquetParsingError" => Some(Self::ParquetParsingError),
2330 b"ParquetUnsupportedCompressionCodec" => Some(Self::ParquetUnsupportedCompressionCodec),
2331 b"ParseAsteriskIsNotAloneInSelectList" => Some(Self::ParseAsteriskIsNotAloneInSelectList),
2332 b"ParseCannotMixSqbAndWildcardInSelectList" => Some(Self::ParseCannotMixSqbAndWildcardInSelectList),
2333 b"ParseCastArity" => Some(Self::ParseCastArity),
2334 b"ParseEmptySelect" => Some(Self::ParseEmptySelect),
2335 b"ParseExpected2TokenTypes" => Some(Self::ParseExpected2TokenTypes),
2336 b"ParseExpectedArgumentDelimiter" => Some(Self::ParseExpectedArgumentDelimiter),
2337 b"ParseExpectedDatePart" => Some(Self::ParseExpectedDatePart),
2338 b"ParseExpectedExpression" => Some(Self::ParseExpectedExpression),
2339 b"ParseExpectedIdentForAlias" => Some(Self::ParseExpectedIdentForAlias),
2340 b"ParseExpectedIdentForAt" => Some(Self::ParseExpectedIdentForAt),
2341 b"ParseExpectedIdentForGroupName" => Some(Self::ParseExpectedIdentForGroupName),
2342 b"ParseExpectedKeyword" => Some(Self::ParseExpectedKeyword),
2343 b"ParseExpectedLeftParenAfterCast" => Some(Self::ParseExpectedLeftParenAfterCast),
2344 b"ParseExpectedLeftParenBuiltinFunctionCall" => Some(Self::ParseExpectedLeftParenBuiltinFunctionCall),
2345 b"ParseExpectedLeftParenValueConstructor" => Some(Self::ParseExpectedLeftParenValueConstructor),
2346 b"ParseExpectedMember" => Some(Self::ParseExpectedMember),
2347 b"ParseExpectedNumber" => Some(Self::ParseExpectedNumber),
2348 b"ParseExpectedRightParenBuiltinFunctionCall" => Some(Self::ParseExpectedRightParenBuiltinFunctionCall),
2349 b"ParseExpectedTokenType" => Some(Self::ParseExpectedTokenType),
2350 b"ParseExpectedTypeName" => Some(Self::ParseExpectedTypeName),
2351 b"ParseExpectedWhenClause" => Some(Self::ParseExpectedWhenClause),
2352 b"ParseInvalidContextForWildcardInSelectList" => Some(Self::ParseInvalidContextForWildcardInSelectList),
2353 b"ParseInvalidPathComponent" => Some(Self::ParseInvalidPathComponent),
2354 b"ParseInvalidTypeParam" => Some(Self::ParseInvalidTypeParam),
2355 b"ParseMalformedJoin" => Some(Self::ParseMalformedJoin),
2356 b"ParseMissingIdentAfterAt" => Some(Self::ParseMissingIdentAfterAt),
2357 b"ParseNonUnaryAgregateFunctionCall" => Some(Self::ParseNonUnaryAgregateFunctionCall),
2358 b"ParseSelectMissingFrom" => Some(Self::ParseSelectMissingFrom),
2359 b"ParseUnExpectedKeyword" => Some(Self::ParseUnExpectedKeyword),
2360 b"ParseUnexpectedOperator" => Some(Self::ParseUnexpectedOperator),
2361 b"ParseUnexpectedTerm" => Some(Self::ParseUnexpectedTerm),
2362 b"ParseUnexpectedToken" => Some(Self::ParseUnexpectedToken),
2363 b"ParseUnknownOperator" => Some(Self::ParseUnknownOperator),
2364 b"ParseUnsupportedAlias" => Some(Self::ParseUnsupportedAlias),
2365 b"ParseUnsupportedCallWithStar" => Some(Self::ParseUnsupportedCallWithStar),
2366 b"ParseUnsupportedCase" => Some(Self::ParseUnsupportedCase),
2367 b"ParseUnsupportedCaseClause" => Some(Self::ParseUnsupportedCaseClause),
2368 b"ParseUnsupportedLiteralsGroupBy" => Some(Self::ParseUnsupportedLiteralsGroupBy),
2369 b"ParseUnsupportedSelect" => Some(Self::ParseUnsupportedSelect),
2370 b"ParseUnsupportedSyntax" => Some(Self::ParseUnsupportedSyntax),
2371 b"ParseUnsupportedToken" => Some(Self::ParseUnsupportedToken),
2372 b"PermanentRedirect" => Some(Self::PermanentRedirect),
2373 b"PermanentRedirectControlError" => Some(Self::PermanentRedirectControlError),
2374 b"PreconditionFailed" => Some(Self::PreconditionFailed),
2375 b"Redirect" => Some(Self::Redirect),
2376 b"ReplicationConfigurationNotFoundError" => Some(Self::ReplicationConfigurationNotFoundError),
2377 b"RequestHeaderSectionTooLarge" => Some(Self::RequestHeaderSectionTooLarge),
2378 b"RequestIsNotMultiPartContent" => Some(Self::RequestIsNotMultiPartContent),
2379 b"RequestTimeTooSkewed" => Some(Self::RequestTimeTooSkewed),
2380 b"RequestTimeout" => Some(Self::RequestTimeout),
2381 b"RequestTorrentOfBucketError" => Some(Self::RequestTorrentOfBucketError),
2382 b"ResponseInterrupted" => Some(Self::ResponseInterrupted),
2383 b"RestoreAlreadyInProgress" => Some(Self::RestoreAlreadyInProgress),
2384 b"ServerSideEncryptionConfigurationNotFoundError" => Some(Self::ServerSideEncryptionConfigurationNotFoundError),
2385 b"ServiceUnavailable" => Some(Self::ServiceUnavailable),
2386 b"SignatureDoesNotMatch" => Some(Self::SignatureDoesNotMatch),
2387 b"SlowDown" => Some(Self::SlowDown),
2388 b"TemporaryRedirect" => Some(Self::TemporaryRedirect),
2389 b"TokenCodeInvalidError" => Some(Self::TokenCodeInvalidError),
2390 b"TokenRefreshRequired" => Some(Self::TokenRefreshRequired),
2391 b"TooManyAccessPoints" => Some(Self::TooManyAccessPoints),
2392 b"TooManyBuckets" => Some(Self::TooManyBuckets),
2393 b"TooManyMultiRegionAccessPointregionsError" => Some(Self::TooManyMultiRegionAccessPointregionsError),
2394 b"TooManyMultiRegionAccessPoints" => Some(Self::TooManyMultiRegionAccessPoints),
2395 b"TooManyTags" => Some(Self::TooManyTags),
2396 b"TruncatedInput" => Some(Self::TruncatedInput),
2397 b"UnauthorizedAccess" => Some(Self::UnauthorizedAccess),
2398 b"UnauthorizedAccessError" => Some(Self::UnauthorizedAccessError),
2399 b"UnexpectedContent" => Some(Self::UnexpectedContent),
2400 b"UnexpectedIPError" => Some(Self::UnexpectedIPError),
2401 b"UnrecognizedFormatException" => Some(Self::UnrecognizedFormatException),
2402 b"UnresolvableGrantByEmailAddress" => Some(Self::UnresolvableGrantByEmailAddress),
2403 b"UnsupportedArgument" => Some(Self::UnsupportedArgument),
2404 b"UnsupportedFunction" => Some(Self::UnsupportedFunction),
2405 b"UnsupportedParquetType" => Some(Self::UnsupportedParquetType),
2406 b"UnsupportedRangeHeader" => Some(Self::UnsupportedRangeHeader),
2407 b"UnsupportedScanRangeInput" => Some(Self::UnsupportedScanRangeInput),
2408 b"UnsupportedSignature" => Some(Self::UnsupportedSignature),
2409 b"UnsupportedSqlOperation" => Some(Self::UnsupportedSqlOperation),
2410 b"UnsupportedSqlStructure" => Some(Self::UnsupportedSqlStructure),
2411 b"UnsupportedStorageClass" => Some(Self::UnsupportedStorageClass),
2412 b"UnsupportedSyntax" => Some(Self::UnsupportedSyntax),
2413 b"UnsupportedTypeForQuerying" => Some(Self::UnsupportedTypeForQuerying),
2414 b"UserKeyMustBeSpecified" => Some(Self::UserKeyMustBeSpecified),
2415 b"ValueParseFailure" => Some(Self::ValueParseFailure),
2416 _ => std::str::from_utf8(s).ok().map(|s| Self::Custom(s.into())),
2417 }
2418 }
2419
2420 #[allow(clippy::match_same_arms)]
2421 #[must_use]
2422 pub fn status_code(&self) -> Option<StatusCode> {
2423 match self {
2424 Self::AccessControlListNotSupported => Some(StatusCode::BAD_REQUEST),
2425 Self::AccessDenied => Some(StatusCode::FORBIDDEN),
2426 Self::AccessPointAlreadyOwnedByYou => Some(StatusCode::CONFLICT),
2427 Self::AccountProblem => Some(StatusCode::FORBIDDEN),
2428 Self::AllAccessDisabled => Some(StatusCode::FORBIDDEN),
2429 Self::AmbiguousFieldName => Some(StatusCode::BAD_REQUEST),
2430 Self::AmbiguousGrantByEmailAddress => Some(StatusCode::BAD_REQUEST),
2431 Self::AuthorizationHeaderMalformed => Some(StatusCode::BAD_REQUEST),
2432 Self::AuthorizationQueryParametersError => Some(StatusCode::BAD_REQUEST),
2433 Self::BadDigest => Some(StatusCode::BAD_REQUEST),
2434 Self::BucketAlreadyExists => Some(StatusCode::CONFLICT),
2435 Self::BucketAlreadyOwnedByYou => Some(StatusCode::CONFLICT),
2436 Self::BucketHasAccessPointsAttached => Some(StatusCode::BAD_REQUEST),
2437 Self::BucketNotEmpty => Some(StatusCode::CONFLICT),
2438 Self::Busy => Some(StatusCode::SERVICE_UNAVAILABLE),
2439 Self::CSVEscapingRecordDelimiter => Some(StatusCode::BAD_REQUEST),
2440 Self::CSVParsingError => Some(StatusCode::BAD_REQUEST),
2441 Self::CSVUnescapedQuote => Some(StatusCode::BAD_REQUEST),
2442 Self::CastFailed => Some(StatusCode::BAD_REQUEST),
2443 Self::ClientTokenConflict => Some(StatusCode::CONFLICT),
2444 Self::ColumnTooLong => Some(StatusCode::BAD_REQUEST),
2445 Self::ConditionalRequestConflict => Some(StatusCode::CONFLICT),
2446 Self::ConnectionClosedByRequester => Some(StatusCode::BAD_REQUEST),
2447 Self::CredentialsNotSupported => Some(StatusCode::BAD_REQUEST),
2448 Self::CrossLocationLoggingProhibited => Some(StatusCode::FORBIDDEN),
2449 Self::DeviceNotActiveError => Some(StatusCode::BAD_REQUEST),
2450 Self::EmptyRequestBody => Some(StatusCode::BAD_REQUEST),
2451 Self::EndpointNotFound => Some(StatusCode::BAD_REQUEST),
2452 Self::EntityTooLarge => Some(StatusCode::BAD_REQUEST),
2453 Self::EntityTooSmall => Some(StatusCode::BAD_REQUEST),
2454 Self::EvaluatorBindingDoesNotExist => Some(StatusCode::BAD_REQUEST),
2455 Self::EvaluatorInvalidArguments => Some(StatusCode::BAD_REQUEST),
2456 Self::EvaluatorInvalidTimestampFormatPattern => Some(StatusCode::BAD_REQUEST),
2457 Self::EvaluatorInvalidTimestampFormatPatternSymbol => Some(StatusCode::BAD_REQUEST),
2458 Self::EvaluatorInvalidTimestampFormatPatternSymbolForParsing => Some(StatusCode::BAD_REQUEST),
2459 Self::EvaluatorInvalidTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST),
2460 Self::EvaluatorLikePatternInvalidEscapeSequence => Some(StatusCode::BAD_REQUEST),
2461 Self::EvaluatorNegativeLimit => Some(StatusCode::BAD_REQUEST),
2462 Self::EvaluatorTimestampFormatPatternDuplicateFields => Some(StatusCode::BAD_REQUEST),
2463 Self::EvaluatorTimestampFormatPatternHourClockAmPmMismatch => Some(StatusCode::BAD_REQUEST),
2464 Self::EvaluatorUnterminatedTimestampFormatPatternToken => Some(StatusCode::BAD_REQUEST),
2465 Self::ExpiredToken => Some(StatusCode::BAD_REQUEST),
2466 Self::ExpressionTooLong => Some(StatusCode::BAD_REQUEST),
2467 Self::ExternalEvalException => Some(StatusCode::BAD_REQUEST),
2468 Self::IllegalLocationConstraintException => Some(StatusCode::BAD_REQUEST),
2469 Self::IllegalSqlFunctionArgument => Some(StatusCode::BAD_REQUEST),
2470 Self::IllegalVersioningConfigurationException => Some(StatusCode::BAD_REQUEST),
2471 Self::IncompleteBody => Some(StatusCode::BAD_REQUEST),
2472 Self::IncorrectEndpoint => Some(StatusCode::BAD_REQUEST),
2473 Self::IncorrectNumberOfFilesInPostRequest => Some(StatusCode::BAD_REQUEST),
2474 Self::IncorrectSqlFunctionArgumentType => Some(StatusCode::BAD_REQUEST),
2475 Self::InlineDataTooLarge => Some(StatusCode::BAD_REQUEST),
2476 Self::IntegerOverflow => Some(StatusCode::BAD_REQUEST),
2477 Self::InternalError => Some(StatusCode::INTERNAL_SERVER_ERROR),
2478 Self::InvalidAccessKeyId => Some(StatusCode::FORBIDDEN),
2479 Self::InvalidAccessPoint => Some(StatusCode::BAD_REQUEST),
2480 Self::InvalidAccessPointAliasError => Some(StatusCode::BAD_REQUEST),
2481 Self::InvalidAddressingHeader => None,
2482 Self::InvalidArgument => Some(StatusCode::BAD_REQUEST),
2483 Self::InvalidBucketAclWithObjectOwnership => Some(StatusCode::BAD_REQUEST),
2484 Self::InvalidBucketName => Some(StatusCode::BAD_REQUEST),
2485 Self::InvalidBucketOwnerAWSAccountID => Some(StatusCode::BAD_REQUEST),
2486 Self::InvalidBucketState => Some(StatusCode::CONFLICT),
2487 Self::InvalidCast => Some(StatusCode::BAD_REQUEST),
2488 Self::InvalidColumnIndex => Some(StatusCode::BAD_REQUEST),
2489 Self::InvalidCompressionFormat => Some(StatusCode::BAD_REQUEST),
2490 Self::InvalidDataSource => Some(StatusCode::BAD_REQUEST),
2491 Self::InvalidDataType => Some(StatusCode::BAD_REQUEST),
2492 Self::InvalidDigest => Some(StatusCode::BAD_REQUEST),
2493 Self::InvalidEncryptionAlgorithmError => Some(StatusCode::BAD_REQUEST),
2494 Self::InvalidExpressionType => Some(StatusCode::BAD_REQUEST),
2495 Self::InvalidFileHeaderInfo => Some(StatusCode::BAD_REQUEST),
2496 Self::InvalidHostHeader => Some(StatusCode::BAD_REQUEST),
2497 Self::InvalidHttpMethod => Some(StatusCode::BAD_REQUEST),
2498 Self::InvalidJsonType => Some(StatusCode::BAD_REQUEST),
2499 Self::InvalidKeyPath => Some(StatusCode::BAD_REQUEST),
2500 Self::InvalidLocationConstraint => Some(StatusCode::BAD_REQUEST),
2501 Self::InvalidObjectState => Some(StatusCode::FORBIDDEN),
2502 Self::InvalidPart => Some(StatusCode::BAD_REQUEST),
2503 Self::InvalidPartOrder => Some(StatusCode::BAD_REQUEST),
2504 Self::InvalidPayer => Some(StatusCode::FORBIDDEN),
2505 Self::InvalidPolicyDocument => Some(StatusCode::BAD_REQUEST),
2506 Self::InvalidQuoteFields => Some(StatusCode::BAD_REQUEST),
2507 Self::InvalidRange => Some(StatusCode::RANGE_NOT_SATISFIABLE),
2508 Self::InvalidRequest => Some(StatusCode::BAD_REQUEST),
2509 Self::InvalidRequestParameter => Some(StatusCode::BAD_REQUEST),
2510 Self::InvalidSOAPRequest => Some(StatusCode::BAD_REQUEST),
2511 Self::InvalidScanRange => Some(StatusCode::BAD_REQUEST),
2512 Self::InvalidSecurity => Some(StatusCode::FORBIDDEN),
2513 Self::InvalidSessionException => Some(StatusCode::BAD_REQUEST),
2514 Self::InvalidSignature => Some(StatusCode::BAD_REQUEST),
2515 Self::InvalidStorageClass => Some(StatusCode::BAD_REQUEST),
2516 Self::InvalidTableAlias => Some(StatusCode::BAD_REQUEST),
2517 Self::InvalidTag => Some(StatusCode::BAD_REQUEST),
2518 Self::InvalidTargetBucketForLogging => Some(StatusCode::BAD_REQUEST),
2519 Self::InvalidTextEncoding => Some(StatusCode::BAD_REQUEST),
2520 Self::InvalidToken => Some(StatusCode::BAD_REQUEST),
2521 Self::InvalidURI => Some(StatusCode::BAD_REQUEST),
2522 Self::JSONParsingError => Some(StatusCode::BAD_REQUEST),
2523 Self::KeyTooLongError => Some(StatusCode::BAD_REQUEST),
2524 Self::LexerInvalidChar => Some(StatusCode::BAD_REQUEST),
2525 Self::LexerInvalidIONLiteral => Some(StatusCode::BAD_REQUEST),
2526 Self::LexerInvalidLiteral => Some(StatusCode::BAD_REQUEST),
2527 Self::LexerInvalidOperator => Some(StatusCode::BAD_REQUEST),
2528 Self::LikeInvalidInputs => Some(StatusCode::BAD_REQUEST),
2529 Self::MalformedACLError => Some(StatusCode::BAD_REQUEST),
2530 Self::MalformedPOSTRequest => Some(StatusCode::BAD_REQUEST),
2531 Self::MalformedPolicy => Some(StatusCode::BAD_REQUEST),
2532 Self::MalformedXML => Some(StatusCode::BAD_REQUEST),
2533 Self::MaxMessageLengthExceeded => Some(StatusCode::BAD_REQUEST),
2534 Self::MaxOperatorsExceeded => Some(StatusCode::BAD_REQUEST),
2535 Self::MaxPostPreDataLengthExceededError => Some(StatusCode::BAD_REQUEST),
2536 Self::MetadataTooLarge => Some(StatusCode::BAD_REQUEST),
2537 Self::MethodNotAllowed => Some(StatusCode::METHOD_NOT_ALLOWED),
2538 Self::MissingAttachment => None,
2539 Self::MissingAuthenticationToken => Some(StatusCode::FORBIDDEN),
2540 Self::MissingContentLength => Some(StatusCode::LENGTH_REQUIRED),
2541 Self::MissingRequestBodyError => Some(StatusCode::BAD_REQUEST),
2542 Self::MissingRequiredParameter => Some(StatusCode::BAD_REQUEST),
2543 Self::MissingSecurityElement => Some(StatusCode::BAD_REQUEST),
2544 Self::MissingSecurityHeader => Some(StatusCode::BAD_REQUEST),
2545 Self::MultipleDataSourcesUnsupported => Some(StatusCode::BAD_REQUEST),
2546 Self::NoLoggingStatusForKey => Some(StatusCode::BAD_REQUEST),
2547 Self::NoSuchAccessPoint => Some(StatusCode::NOT_FOUND),
2548 Self::NoSuchAsyncRequest => Some(StatusCode::NOT_FOUND),
2549 Self::NoSuchBucket => Some(StatusCode::NOT_FOUND),
2550 Self::NoSuchBucketPolicy => Some(StatusCode::NOT_FOUND),
2551 Self::NoSuchCORSConfiguration => Some(StatusCode::NOT_FOUND),
2552 Self::NoSuchKey => Some(StatusCode::NOT_FOUND),
2553 Self::NoSuchLifecycleConfiguration => Some(StatusCode::NOT_FOUND),
2554 Self::NoSuchMultiRegionAccessPoint => Some(StatusCode::NOT_FOUND),
2555 Self::NoSuchObjectLockConfiguration => Some(StatusCode::NOT_FOUND),
2556 Self::NoSuchResource => Some(StatusCode::NOT_FOUND),
2557 Self::NoSuchTagSet => Some(StatusCode::NOT_FOUND),
2558 Self::NoSuchUpload => Some(StatusCode::NOT_FOUND),
2559 Self::NoSuchVersion => Some(StatusCode::NOT_FOUND),
2560 Self::NoSuchWebsiteConfiguration => Some(StatusCode::NOT_FOUND),
2561 Self::NoTransformationDefined => Some(StatusCode::NOT_FOUND),
2562 Self::NotDeviceOwnerError => Some(StatusCode::BAD_REQUEST),
2563 Self::NotImplemented => Some(StatusCode::NOT_IMPLEMENTED),
2564 Self::NotModified => Some(StatusCode::NOT_MODIFIED),
2565 Self::NotSignedUp => Some(StatusCode::FORBIDDEN),
2566 Self::NumberFormatError => Some(StatusCode::BAD_REQUEST),
2567 Self::ObjectLockConfigurationNotFoundError => Some(StatusCode::NOT_FOUND),
2568 Self::ObjectSerializationConflict => Some(StatusCode::BAD_REQUEST),
2569 Self::OperationAborted => Some(StatusCode::CONFLICT),
2570 Self::OverMaxColumn => Some(StatusCode::BAD_REQUEST),
2571 Self::OverMaxParquetBlockSize => Some(StatusCode::BAD_REQUEST),
2572 Self::OverMaxRecordSize => Some(StatusCode::BAD_REQUEST),
2573 Self::OwnershipControlsNotFoundError => Some(StatusCode::NOT_FOUND),
2574 Self::ParquetParsingError => Some(StatusCode::BAD_REQUEST),
2575 Self::ParquetUnsupportedCompressionCodec => Some(StatusCode::BAD_REQUEST),
2576 Self::ParseAsteriskIsNotAloneInSelectList => Some(StatusCode::BAD_REQUEST),
2577 Self::ParseCannotMixSqbAndWildcardInSelectList => Some(StatusCode::BAD_REQUEST),
2578 Self::ParseCastArity => Some(StatusCode::BAD_REQUEST),
2579 Self::ParseEmptySelect => Some(StatusCode::BAD_REQUEST),
2580 Self::ParseExpected2TokenTypes => Some(StatusCode::BAD_REQUEST),
2581 Self::ParseExpectedArgumentDelimiter => Some(StatusCode::BAD_REQUEST),
2582 Self::ParseExpectedDatePart => Some(StatusCode::BAD_REQUEST),
2583 Self::ParseExpectedExpression => Some(StatusCode::BAD_REQUEST),
2584 Self::ParseExpectedIdentForAlias => Some(StatusCode::BAD_REQUEST),
2585 Self::ParseExpectedIdentForAt => Some(StatusCode::BAD_REQUEST),
2586 Self::ParseExpectedIdentForGroupName => Some(StatusCode::BAD_REQUEST),
2587 Self::ParseExpectedKeyword => Some(StatusCode::BAD_REQUEST),
2588 Self::ParseExpectedLeftParenAfterCast => Some(StatusCode::BAD_REQUEST),
2589 Self::ParseExpectedLeftParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST),
2590 Self::ParseExpectedLeftParenValueConstructor => Some(StatusCode::BAD_REQUEST),
2591 Self::ParseExpectedMember => Some(StatusCode::BAD_REQUEST),
2592 Self::ParseExpectedNumber => Some(StatusCode::BAD_REQUEST),
2593 Self::ParseExpectedRightParenBuiltinFunctionCall => Some(StatusCode::BAD_REQUEST),
2594 Self::ParseExpectedTokenType => Some(StatusCode::BAD_REQUEST),
2595 Self::ParseExpectedTypeName => Some(StatusCode::BAD_REQUEST),
2596 Self::ParseExpectedWhenClause => Some(StatusCode::BAD_REQUEST),
2597 Self::ParseInvalidContextForWildcardInSelectList => Some(StatusCode::BAD_REQUEST),
2598 Self::ParseInvalidPathComponent => Some(StatusCode::BAD_REQUEST),
2599 Self::ParseInvalidTypeParam => Some(StatusCode::BAD_REQUEST),
2600 Self::ParseMalformedJoin => Some(StatusCode::BAD_REQUEST),
2601 Self::ParseMissingIdentAfterAt => Some(StatusCode::BAD_REQUEST),
2602 Self::ParseNonUnaryAgregateFunctionCall => Some(StatusCode::BAD_REQUEST),
2603 Self::ParseSelectMissingFrom => Some(StatusCode::BAD_REQUEST),
2604 Self::ParseUnExpectedKeyword => Some(StatusCode::BAD_REQUEST),
2605 Self::ParseUnexpectedOperator => Some(StatusCode::BAD_REQUEST),
2606 Self::ParseUnexpectedTerm => Some(StatusCode::BAD_REQUEST),
2607 Self::ParseUnexpectedToken => Some(StatusCode::BAD_REQUEST),
2608 Self::ParseUnknownOperator => Some(StatusCode::BAD_REQUEST),
2609 Self::ParseUnsupportedAlias => Some(StatusCode::BAD_REQUEST),
2610 Self::ParseUnsupportedCallWithStar => Some(StatusCode::BAD_REQUEST),
2611 Self::ParseUnsupportedCase => Some(StatusCode::BAD_REQUEST),
2612 Self::ParseUnsupportedCaseClause => Some(StatusCode::BAD_REQUEST),
2613 Self::ParseUnsupportedLiteralsGroupBy => Some(StatusCode::BAD_REQUEST),
2614 Self::ParseUnsupportedSelect => Some(StatusCode::BAD_REQUEST),
2615 Self::ParseUnsupportedSyntax => Some(StatusCode::BAD_REQUEST),
2616 Self::ParseUnsupportedToken => Some(StatusCode::BAD_REQUEST),
2617 Self::PermanentRedirect => Some(StatusCode::MOVED_PERMANENTLY),
2618 Self::PermanentRedirectControlError => Some(StatusCode::MOVED_PERMANENTLY),
2619 Self::PreconditionFailed => Some(StatusCode::PRECONDITION_FAILED),
2620 Self::Redirect => Some(StatusCode::TEMPORARY_REDIRECT),
2621 Self::ReplicationConfigurationNotFoundError => Some(StatusCode::NOT_FOUND),
2622 Self::RequestHeaderSectionTooLarge => Some(StatusCode::BAD_REQUEST),
2623 Self::RequestIsNotMultiPartContent => Some(StatusCode::BAD_REQUEST),
2624 Self::RequestTimeTooSkewed => Some(StatusCode::FORBIDDEN),
2625 Self::RequestTimeout => Some(StatusCode::BAD_REQUEST),
2626 Self::RequestTorrentOfBucketError => Some(StatusCode::BAD_REQUEST),
2627 Self::ResponseInterrupted => Some(StatusCode::BAD_REQUEST),
2628 Self::RestoreAlreadyInProgress => Some(StatusCode::CONFLICT),
2629 Self::ServerSideEncryptionConfigurationNotFoundError => Some(StatusCode::BAD_REQUEST),
2630 Self::ServiceUnavailable => Some(StatusCode::SERVICE_UNAVAILABLE),
2631 Self::SignatureDoesNotMatch => Some(StatusCode::FORBIDDEN),
2632 Self::SlowDown => Some(StatusCode::SERVICE_UNAVAILABLE),
2633 Self::TemporaryRedirect => Some(StatusCode::TEMPORARY_REDIRECT),
2634 Self::TokenCodeInvalidError => Some(StatusCode::BAD_REQUEST),
2635 Self::TokenRefreshRequired => Some(StatusCode::BAD_REQUEST),
2636 Self::TooManyAccessPoints => Some(StatusCode::BAD_REQUEST),
2637 Self::TooManyBuckets => Some(StatusCode::BAD_REQUEST),
2638 Self::TooManyMultiRegionAccessPointregionsError => Some(StatusCode::BAD_REQUEST),
2639 Self::TooManyMultiRegionAccessPoints => Some(StatusCode::BAD_REQUEST),
2640 Self::TooManyTags => Some(StatusCode::BAD_REQUEST),
2641 Self::TruncatedInput => Some(StatusCode::BAD_REQUEST),
2642 Self::UnauthorizedAccess => Some(StatusCode::UNAUTHORIZED),
2643 Self::UnauthorizedAccessError => Some(StatusCode::FORBIDDEN),
2644 Self::UnexpectedContent => Some(StatusCode::BAD_REQUEST),
2645 Self::UnexpectedIPError => Some(StatusCode::FORBIDDEN),
2646 Self::UnrecognizedFormatException => Some(StatusCode::BAD_REQUEST),
2647 Self::UnresolvableGrantByEmailAddress => Some(StatusCode::BAD_REQUEST),
2648 Self::UnsupportedArgument => Some(StatusCode::BAD_REQUEST),
2649 Self::UnsupportedFunction => Some(StatusCode::BAD_REQUEST),
2650 Self::UnsupportedParquetType => Some(StatusCode::BAD_REQUEST),
2651 Self::UnsupportedRangeHeader => Some(StatusCode::BAD_REQUEST),
2652 Self::UnsupportedScanRangeInput => Some(StatusCode::BAD_REQUEST),
2653 Self::UnsupportedSignature => Some(StatusCode::BAD_REQUEST),
2654 Self::UnsupportedSqlOperation => Some(StatusCode::BAD_REQUEST),
2655 Self::UnsupportedSqlStructure => Some(StatusCode::BAD_REQUEST),
2656 Self::UnsupportedStorageClass => Some(StatusCode::BAD_REQUEST),
2657 Self::UnsupportedSyntax => Some(StatusCode::BAD_REQUEST),
2658 Self::UnsupportedTypeForQuerying => Some(StatusCode::BAD_REQUEST),
2659 Self::UserKeyMustBeSpecified => Some(StatusCode::BAD_REQUEST),
2660 Self::ValueParseFailure => Some(StatusCode::BAD_REQUEST),
2661 Self::Custom(_) => None,
2662 }
2663 }
2664}