// IsError checks if the given err is an aws error or not or any valid error.
IsError checks if the given err is an aws error or not or any valid error.
// IsError checks if the given err is an aws error or not or any valid error .
func IsError(err error) (bool, error) {
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case "RequestExpired":
				return true, fmt.Errorf("%v: Provided credential has expired", aerr.Code())
			default:
				return true, fmt.Errorf("%s", aerr.Error())
			}
		}
		return true, err
	}
	return false, nil
}
func IsError ( err error ) ( bool , error ) { if err != nil { if aerr , ok := err . ( awserr . Error ) ; ok { switch aerr . Code ( ) { case " " : return true , fmt . Errorf ( " " , aerr . Code ( ) ) default : return true , fmt . Errorf ( " " , aerr . Error ( ) ) } } return true , err } return false , nil }
IsError checks if the given err is an aws error or not or any valid error.
IsError checks if the given err is an aws error or not or any valid error .