// fromAWSError returns the HTTP status code as well as the error message from
// an awserr.Error instance.
fromAWSError returns the HTTP status code as well as the error message from
an awserr.Error instance.
// fromAWSError returns the HTTP status code as well as the error message from // an awserr . Error instance .
func fromAWSErr(err error) error {
	if awsErr, ok := err.(awserr.Error); ok {
		if reqErr, ok := err.(awserr.RequestFailure); ok {
			return newError(reqErr.StatusCode(), awsErr.Message())
		}
		return newInternalServerError(awsErr.Message())
	}
	return newInternalServerError("AWS API Error: %v", err)
}
func fromAWSErr ( err error ) error { if awsErr , ok := err . ( awserr . Error ) ; ok { if reqErr , ok := err . ( awserr . RequestFailure ) ; ok { return newError ( reqErr . StatusCode ( ) , awsErr . Message ( ) ) } return newInternalServerError ( awsErr . Message ( ) ) } return newInternalServerError ( " " , err ) }
fromAWSError returns the HTTP status code as well as the error message from
an awserr.Error instance.
fromAWSError returns the HTTP status code as well as the error message from an awserr . Error instance .