Skip to content

docs: add developer guides for SDK error handling#23

Merged
Patrick-Ehimen merged 1 commit intomainfrom
docs/sdk-integration-guides
Oct 15, 2025
Merged

docs: add developer guides for SDK error handling#23
Patrick-Ehimen merged 1 commit intomainfrom
docs/sdk-integration-guides

Conversation

@Patrick-Ehimen
Copy link
Copy Markdown
Owner

@Patrick-Ehimen Patrick-Ehimen commented Oct 10, 2025

Summary

Adds comprehensive developer documentation for the SDK error handling system, including integration guides, andconfiguration references

  • SDK Integration Guide: Quick setup, error handling, and best practices
  • Configuration Reference: Complete options for SDK, retry policies, and circuit breaker
  • Main Documentation Index: Quick navigation and overview
apps/docs/
├── README.md                    # Main index with quick start
├── guides/
│   ├── sdk-integration.md      # Integration and basic usage
│   └── configuration.md        # Complete configuration reference

Summary by Sourcery

Provide comprehensive developer documentation for the SDK error handling system, including a main README, an SDK Integration Guide, and a Configuration Reference.

Documentation:

  • Add main documentation index (README.md) with quick start, feature overview, error types table, and examples
  • Add SDK Integration Guide detailing installation, setup, error handling configuration, event monitoring, metrics, and best practices
  • Add Configuration Reference outlining SDK config options, retry policies, circuit breaker settings, environment and operation-specific configurations, monitoring, and performance tuning

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Oct 10, 2025

Reviewer's Guide

Introduces a new documentation structure under apps/docs, including a main index and two detailed guides for integrating and configuring the SDK's error handling system with code samples and best practices.

Class diagram for SDK error handling configuration types

classDiagram
  class LighthouseConfig {
    +string apiKey
    +string baseUrl
    +number timeout
    +number maxRetries
    +boolean debug
  }
  class ErrorHandler {
    +number maxRetries
    +number baseDelay
    +number maxDelay
    +number backoffMultiplier
    +boolean jitter
    +number timeout
  }
  class CircuitBreaker {
    +number failureThreshold
    +number successThreshold
    +number timeout
    +number monitoringWindow
  }
  LighthouseAISDK --> LighthouseConfig
  LighthouseAISDK --> ErrorHandler
  LighthouseAISDK --> CircuitBreaker
Loading

File-Level Changes

Change Details Files
Add main documentation index
  • Created README.md with quick start example
  • Outlined documentation structure and navigation links
  • Summarized key features, error types, and quick code snippets
apps/docs/README.md
Add SDK Integration Guide
  • Provided installation and basic setup instructions
  • Documented default and custom error handling configurations
  • Included event monitoring, error metrics, and best practices
apps/docs/guides/sdk-integration.md
Add Configuration Reference Guide
  • Defined SDK configuration interface and environment-specific examples
  • Detailed retry policy and circuit breaker defaults and customization
  • Covered operation-specific, monitoring, and performance tuning options
apps/docs/guides/configuration.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • The README references troubleshooting/common-issues.md and troubleshooting/error-scenarios.md but those files aren’t included—please add them or update the links.
  • There’s duplication of the basic configuration snippet in the integration guide and README; consider centralizing that example or linking directly to the configuration reference.
  • The integration guide covers retries and metrics but doesn’t link to the circuit breaker section—adding a cross‐reference would help users find that configuration more easily.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The README references troubleshooting/common-issues.md and troubleshooting/error-scenarios.md but those files aren’t included—please add them or update the links.
- There’s duplication of the basic configuration snippet in the integration guide and README; consider centralizing that example or linking directly to the configuration reference.
- The integration guide covers retries and metrics but doesn’t link to the circuit breaker section—adding a cross‐reference would help users find that configuration more easily.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Patrick-Ehimen Patrick-Ehimen merged commit c6ea323 into main Oct 15, 2025
1 check passed
@Patrick-Ehimen Patrick-Ehimen deleted the docs/sdk-integration-guides branch October 23, 2025 16:40
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.

1 participant