8000 fix 500 error for SelectObjectContent (#8689) · codeperl/localstack@48f27fa · GitHub
[go: up one dir, main page]

Skip to content

Commit 48f27fa

Browse files
authored
fix 500 error for SelectObjectContent (localstack#8689)
1 parent a000683 commit 48f27fa

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

localstack/services/s3/provider.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,15 @@
112112
ReplicationConfigurationNotFoundError,
113113
RequestPayer,
114114
S3Api,
115+
SelectObjectContentOutput,
116+
SelectObjectContentRequest,
115117
SkipValidation,
116118
StorageClass,
117119
Token,
118120
)
119121
from localstack.aws.api.s3 import Type as GranteeType
120122
from localstack.aws.api.s3 import UploadPartOutput, UploadPartRequest, WebsiteConfiguration
123+
from localstack.aws.forwarder import NotImplementedAvoidFallbackError
121124
from localstack.aws.handlers import (
122125
modify_service_response,
123126
preprocess_request,
@@ -1555,6 +1558,17 @@ def get_bucket_logging(
15551558

15561559
return GetBucketLoggingOutput(LoggingEnabled=moto_bucket.logging)
15571560

1561+
@handler("SelectObjectContent", expand=False)
1562+
def select_object_content(
1563+
self,
1564+
context: RequestContext,
1565+
request: SelectObjectContentRequest,
1566+
) -> SelectObjectContentOutput:
1567+
# this operation is currently implemented by moto, but raises a 500 error because of the format necessary,
1568+
# and streaming capability.
1569+
# avoid a fallback to moto and return the 501 to the client directly instead.
1570+
raise NotImplementedAvoidFallbackError
1571+
15581572

15591573
def validate_bucket_analytics_configuration(
15601574
id: AnalyticsId, analytics_configuration: AnalyticsConfiguration

0 commit comments

Comments
 (0)
0