How to simulate errors against DynamoDB in Go?

Viewed 126
1 Answers
import (
   errors "golang.org/x/xerrors"
)

client := dynamodb.New(sess)
client.Handlers.Validate.AfterEachFn = func(item request.HandlerListRunItem) bool {
    item.Request.Error = errors.New("simulated error")
    return false
}
Related