Skip to content

Conversation

@christian-kreuzberger-dtx
Copy link
Collaborator

Slightly improve error handling (also refactored the code a bit, and removed the retry logic; either it works the first time, or it doesn't). I hope this helps to pinpoint the problem in #199 .

Old behaviour
image

New behaviour
image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves error handling during the initial Dynatrace connection test by removing retry logic and enhancing error messages. The change simplifies the connection flow to either succeed or fail immediately with better error details.

Key changes:

  • Removed retry logic with exponential backoff for initial connection testing
  • Extracted error handling utility to separate module for better organization
  • Enhanced error messages with visual indicators (✅/❌) and more detailed information

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/utils/dynatrace-connection-utils.ts New utility module for handling ClientRequestError with enhanced error formatting
src/index.ts Refactored connection testing to remove retry logic, use new error handler, and improve error messages
CHANGELOG.md Added entry documenting the improved error handling feature

Copy link
Collaborator

@MrManny MrManny left a comment

Choose a reason for hiding this comment

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

LGTM, with or without Copilot's spelling suggestions :)

@christian-kreuzberger-dtx christian-kreuzberger-dtx merged commit 2b78867 into main Oct 15, 2025
5 checks passed
@christian-kreuzberger-dtx christian-kreuzberger-dtx deleted the patch/improve-error-handling branch October 15, 2025 08:50
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