Skip to content

Conversation

@Mkassabov
Copy link
Contributor

No description provided.

@Mkassabov Mkassabov force-pushed the mkassabov/retry-errors branch from baa60fb to c9cfcfd Compare November 12, 2025 16:15
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 12, 2025

Open in StackBlitz

npm i https://pkg.pr.new/alchemy-run/itty-aws@78

commit: c9cfcfd

Comment on lines +261 to +274
return program.pipe(
Effect.tapError((e) =>
Effect.logDebug("AWS Request Failed, Retrying...", {
error: e,
}),
),
Effect.retry({
schedule: Schedule.intersect(
Schedule.exponential("100 millis"),
Schedule.recurs(5),
),
while: (e) => retryableErrorTags.includes(e._tag),
}),
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a way we can make this configurable or injectable as a layer with a sensible default.

Comment on lines +11 to +18
export const retryableErrorTags = [
"InternalFailure",
"RequestExpired",
"ServiceException",
"ServiceUnavailable",
"ThrottlingException",
"TooManyRequestsException",
];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this all of the errors? Can we extract them. Maybe the smithy models has information we cam use, e.g. all 5xx errors should be retried. Maybe there's other metadata.

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