Skip to content

Commit

Permalink
Fix typo of err.Code()
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushi-ishibashi committed Nov 10, 2017
1 parent 0f45448 commit 5ca22dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_elasticsearch_domain_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func resourceAwsElasticSearchDomainPolicyRead(d *schema.ResourceData, meta inter
DomainName: aws.String(name),
})
if err != nil {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFound" {
if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == "ResourceNotFoundException" {
log.Printf("[WARN] ElasticSearch Domain %q not found, removing", name)
d.SetId("")
return nil
Expand Down

0 comments on commit 5ca22dc

Please sign in to comment.