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

Commit

Permalink
fix: Classify to many open files
Browse files Browse the repository at this point in the history
  • Loading branch information
roneli committed Jun 22, 2022
1 parent b3d7476 commit 3ce188e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,19 @@ func classifyError(err error, fallbackType diag.Type, accounts []string, opts ..
),
}
}
if strings.Contains(err.Error(), "socket: too many open files") {
return diag.Diagnostics{
RedactError(accounts, diag.NewBaseError(err,
diag.THROTTLE,
append(opts,
diag.WithType(diag.THROTTLE),
diag.WithSeverity(diag.WARNING),
ParseSummaryMessage(err),
diag.WithDetails("CloudQuery AWS provider has been throttled. Too many open files, try to increase your max file descriptors in your system or contact us on discord (https://cloudquery.io/discord)"),
)...),
),
}
}

// Take over from SDK and always return diagnostics, redacting PII
if d, ok := err.(diag.Diagnostic); ok {
Expand Down

0 comments on commit 3ce188e

Please sign in to comment.