|
@@ -72,7 +72,7 @@ func consumer(ctx context.Context, w io.Writer, enc *json.Encoder, client *sqs.C
|
|
|
for {
|
|
|
recv, err := client.ReceiveMessage(ctx, &rmi)
|
|
|
if err != nil {
|
|
|
- return fmt.Errorf("failed receiving from queue: %v, aborting", err)
|
|
|
+ return fmt.Errorf("failed receiving from queue: %w, aborting", err)
|
|
|
}
|
|
|
if len(recv.Messages) == 0 {
|
|
|
fmt.Fprintf(w, "No message with %d seconds timeout\n", rmi.WaitTimeSeconds)
|
|
@@ -132,7 +132,7 @@ func validateMessage(msg message) (*Event, error) {
|
|
|
}
|
|
|
evt.MessageID, err = uuid.Parse(*msg.MessageId)
|
|
|
if err != nil {
|
|
|
- return nil, fmt.Errorf("error parsing MessageId as a UUID: %v", err)
|
|
|
+ return nil, fmt.Errorf("error parsing MessageId as a UUID: %w", err)
|
|
|
}
|
|
|
if msg.MD5OfBody == nil {
|
|
|
return nil, fmt.Errorf("error: MD5OfBody is nil")
|