raol / amazon-sqs-net-extended-client-lib

Extension to Amazon SQS that adds support for sending and receiving messages greater than 256K
Apache License 2.0
39 stars 33 forks source link

GetTextFromS3Async Error #14

Closed nrcmkoh closed 4 years ago

nrcmkoh commented 5 years ago

I am seeing the following message in our logs:

Failed to get the S3 object which contains the message payload. Message was not received.

This appears to be coming from here. I'd like to see an ErrorCode or something else that might give me more information.

How can I catch this error to get more information about it? It doesn't catch an exception of type AmazonClientException.

try {
  var response = client.ReceiveMessageAsync(request).Result;
} catch (AmazonClientException ex) {
// doesn't enter here
} catch (Exception ex) {
// enters here, but I want to get more info about the error
}
raol commented 5 years ago

Hi, I'm wrapping the original exception, as you can see from here So to get all details you need to log InnerException for the exception you caught.