-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQS ReceiveMessageWithContext: SerializationError: failed to unmarshal response error #5235
Comments
Looking into this with priority. |
Hi @ainsleyclark , Thanks for your patience. We had a major re-work done with SQS not too long ago where the service migrated their protocol from SQS query (xml based) to JSON protocol. I'm wondering if this issue might be related. Can you enable the debug logs, inspect and share with us the raw response that is sent back from the service? cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion("us-east-1"), config.WithClientLogMode(aws.LogRequestWithBody|aws.LogResponseWithBody))
if err != nil {
panic(err)
}
client := sqs.NewFromConfig(cfg) Thanks! |
Hi @RanVaknin Thanks for your reply. Due to constraints it may be quite difficult to enable logging to inspect the response body. Is there any workaround so we can continue to keep XML or is it a hard swap? |
Hi @ainsleyclark , This is a hard swap. The Protocol is defined on the model level, so while you may be able to call the API directly with whichever wire protocol you choose, Since the SDK is defined based on the model, and the model can only have a single wire protocol defined, the SDK is scoped to that single protocol, which in this case is JSON. The only other workaround I can think of is to downgrade the SDK but its not recommended. The solution here is to get 3rd party Thanks, |
Comments on closed issues are hard for our team to see. |
Describe the bug
When bumping
aws-sdk-go
fromv1.47.5
to latest, a large amount ofSerializationError
errors are returned when using the SQSReceiveMessageWithContext
method.Although the serialisation error is a red herring, it only returns
Bad Request
in the response body bytes, making it nearly impssible to debug and fine out the correct 400 response code as defined in the ReceiveMessage documentation.I'm unsure if there has been a change with SQS but it seems an update has broken backwards compatibility.
Expected Behavior
Either:
Current Behavior
An error is returned from the request, as shown below.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
SDK version used
v1.51.25
Environment details (Version of Go (
go version
)? OS name and version, etc.)go v1.22.0
The text was updated successfully, but these errors were encountered: