Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
fix: Ignore not found errors in apigateway (#1192)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmatov authored Jul 11, 2022
1 parent 7452701 commit e963155
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions resources/services/apigateway/rest_apis.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,9 @@ func fetchApigatewayRestApiAuthorizers(ctx context.Context, meta schema.ClientMe
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Items
Expand All @@ -788,6 +791,9 @@ func fetchApigatewayRestApiDeployments(ctx context.Context, meta schema.ClientMe
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Items
Expand All @@ -808,6 +814,9 @@ func fetchApigatewayRestApiDocumentationParts(ctx context.Context, meta schema.C
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Items
Expand Down Expand Up @@ -851,6 +860,9 @@ func fetchApigatewayRestApiGatewayResponses(ctx context.Context, meta schema.Cli
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Items
Expand Down Expand Up @@ -927,6 +939,9 @@ func fetchApigatewayRestApiRequestValidators(ctx context.Context, meta schema.Cl
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Items
Expand All @@ -947,6 +962,9 @@ func fetchApigatewayRestApiResources(ctx context.Context, meta schema.ClientMeta
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Items
Expand All @@ -967,6 +985,9 @@ func fetchApigatewayRestApiStages(ctx context.Context, meta schema.ClientMeta, p
options.Region = c.Region
})
if err != nil {
if c.IsNotFoundError(err) {
return nil
}
return diag.WrapError(err)
}
res <- response.Item
Expand Down

0 comments on commit e963155

Please sign in to comment.