Skip to content

Conversation

@maximelb
Copy link
Contributor

Summary

  • Implements retry logic with exponential backoff to handle transient API failures
  • Focuses on brief interruptions (max 1 minute retry window)
  • Prevents unnecessary adapter restarts and data collection gaps

Changes

  • Added retry mechanism to API client with exponential backoff
  • Handles timeout errors, connection failures, and HTTP 503/504 responses
  • Respects context cancellation during retry loops

Test Plan

  • Verify code compiles successfully
  • Run existing test suite
  • Monitor adapter behavior in production for improved stability
  • Verify retry behavior under simulated timeout conditions

🤖 Generated with Claude Code

Implement exponential backoff retry mechanism to handle temporary failures:
- Retry on timeout errors (context deadline exceeded, Client.Timeout)
- Retry on HTTP 503 (Service Unavailable) and 504 (Gateway Timeout)
- Retry on connection errors (refused, reset)
- Max retry duration: 1 minute for brief transient failures
- Exponential backoff: 1s initial, 10s max, 2x multiplier

This improves reliability by handling intermittent API issues without
requiring manual adapter restarts.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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.

2 participants