Skip to content

Commit

Permalink
middleware: fix date header parse error log (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhochman committed Feb 5, 2021
1 parent db0cc11 commit 60ec63e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aws/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/aws/aws-sdk-go-v2/internal/rand"
"github.com/aws/aws-sdk-go-v2/internal/sdk"
"github.com/aws/smithy-go/logging"
"github.com/aws/smithy-go/middleware"
smithyrand "github.com/aws/smithy-go/rand"
smithyhttp "github.com/aws/smithy-go/transport/http"
Expand Down Expand Up @@ -70,7 +71,7 @@ func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middlewa
serverTime, parseErr = http.ParseTime(respDateHeader)
if parseErr != nil {
logger := middleware.GetLogger(ctx)
logger.Logf("failed to parse response Date Header value, got %v",
logger.Logf(logging.Warn, "failed to parse response Date header value, got %v",
parseErr.Error())
break
}
Expand Down

0 comments on commit 60ec63e

Please sign in to comment.