From bb866b01407bb49c9d1a9acaf59c6a8c85e86dbf Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 21 May 2015 16:15:21 -0400 Subject: [PATCH] AWS changed their error interface; fix compile breakage. --- physical/s3.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/physical/s3.go b/physical/s3.go index bb5bffe12..80a019f2a 100644 --- a/physical/s3.go +++ b/physical/s3.go @@ -11,6 +11,7 @@ import ( "github.com/armon/go-metrics" "github.com/awslabs/aws-sdk-go/aws" + "github.com/awslabs/aws-sdk-go/aws/awserr" "github.com/awslabs/aws-sdk-go/aws/credentials" "github.com/awslabs/aws-sdk-go/service/s3" ) @@ -101,9 +102,9 @@ func (s *S3Backend) Get(key string) (*Entry, error) { Key: aws.String(key), }) - if awserr := aws.Error(err); awserr != nil { + if awsErr, ok := err.(awserr.RequestFailure); ok { // Return nil on 404s, error on anything else - if awserr.StatusCode == 404 { + if awsErr.StatusCode() == 404 { return nil, nil } else { return nil, err