Skip to content

Conversation

@DTCurrie
Copy link
Member

@DTCurrie DTCurrie commented Nov 8, 2025

Previously, the RobotClient's connection logic would attempt to retry on all errors, regardless of whether they were recoverable. This led to unnecessary retry cycles on fatal errors such as authentication failures, invalid arguments, or configuration issues.

This change introduces error classification into the client's connection and reconnection logic to prevent retries on non-recoverable errors.

@DTCurrie DTCurrie self-assigned this Nov 8, 2025
@DTCurrie DTCurrie marked this pull request as ready for review November 10, 2025 21:29
@DTCurrie DTCurrie requested a review from a team as a code owner November 10, 2025 21:29
@DTCurrie DTCurrie requested review from lia-viam and njooma and removed request for a team November 10, 2025 21:29
Comment on lines +143 to +153
[
Code.Canceled,
Code.InvalidArgument,
Code.NotFound,
Code.AlreadyExists,
Code.PermissionDenied,
Code.FailedPrecondition,
Code.OutOfRange,
Code.Unimplemented,
Code.Unauthenticated,
].includes(error.code)
Copy link
Member Author

Choose a reason for hiding this comment

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

Let me know if we should add/remove anything from this list.

Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

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

this is nice

Base automatically changed from dont-swallow-errors-when-dialing to main November 17, 2025 21:55
@DTCurrie DTCurrie merged commit 08c0925 into main Nov 17, 2025
3 checks passed
@DTCurrie DTCurrie deleted the dont-retry-on-exceptional-errors branch November 17, 2025 21:56
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