Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: refactor for better typing and readability #1262

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

shetzel
Copy link
Contributor

@shetzel shetzel commented Mar 19, 2024

What does this PR do?

Adds 502, 503, and 420 error codes to list of responses to retry during deploy polling.

What issues does this PR fix or reference?

@W-15289218@

@shetzel shetzel requested a review from a team as a code owner March 19, 2024 23:20
@@ -229,23 +229,34 @@ export abstract class MetadataTransfer<
await Lifecycle.getInstance().emitWarning('Metadata API response not parseable');
return { completed: false };
}
const retryableErrors = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should work. I think this has gotten big/complex enough to make it it separate function (SRP) vs. being inside poll

isRetryable(error: unknown) : boolean and then let it contain the error list and manage the type checks on what it's being passed.

@mshanemc mshanemc merged commit 8d89dbc into main Mar 20, 2024
68 checks passed
@mshanemc mshanemc deleted the sh/add-error-codes-to-retries branch March 20, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants