Include XML response template
This commit is contained in:
parent
f8cbcfc098
commit
97b7781c13
@ -108,7 +108,7 @@ class SQSResponse(BaseResponse):
|
|||||||
delay_seconds = self.querystring.get('DelaySeconds')
|
delay_seconds = self.querystring.get('DelaySeconds')
|
||||||
|
|
||||||
if len(message) > MAXIMUM_MESSAGE_LENGTH:
|
if len(message) > MAXIMUM_MESSAGE_LENGTH:
|
||||||
return "One or more parameters are invalid. Reason: Message must be shorter than 262144 bytes.", dict(status=400)
|
return ERROR_TOO_LONG_RESPONSE, dict(status=400)
|
||||||
|
|
||||||
if delay_seconds:
|
if delay_seconds:
|
||||||
delay_seconds = int(delay_seconds[0])
|
delay_seconds = int(delay_seconds[0])
|
||||||
@ -421,3 +421,13 @@ PURGE_QUEUE_RESPONSE = """<PurgeQueueResponse>
|
|||||||
</RequestId>
|
</RequestId>
|
||||||
</ResponseMetadata>
|
</ResponseMetadata>
|
||||||
</PurgeQueueResponse>"""
|
</PurgeQueueResponse>"""
|
||||||
|
|
||||||
|
ERROR_TOO_LONG_RESPONSE = """<ErrorResponse xmlns="http://queue.amazonaws.com/doc/2012-11-05/">
|
||||||
|
<Error>
|
||||||
|
<Type>Sender</Type>
|
||||||
|
<Code>InvalidParameterValue</Code>
|
||||||
|
<Message>One or more parameters are invalid. Reason: Message must be shorter than 262144 bytes.</Message>
|
||||||
|
<Detail/>
|
||||||
|
</Error>
|
||||||
|
<RequestId>6fde8d1e-52cd-4581-8cd9-c512f4c64223</RequestId>
|
||||||
|
</ErrorResponse>"""
|
||||||
|
Loading…
Reference in New Issue
Block a user