asyncapi / asyncapi/cli

[BUG] Registry validation swallows error details, making debugging impossible

Open
#2,013 6 comments 0 reactions 0 assignees View on GitHub
bug stale
Dominant language
TypeScript
Stars
272
Forks
375
Avg merge
3h 22m
Merged PRs (30d)
8

Description

### Describe the bug.

The registryValidation function in src/utils/generate/registry.ts catches all errors during registry URL validation but discards the original error information. This makes it impossible for users to diagnose why their registry connection failed (network timeout, DNS failure, SSL error, proxy issues, etc.).

### Expected behavior

Users should see the actual underlying error so they can fix the problem. For example:
Error: Can't fetch registryURL: https://my-registry.example.com
Caused by: TypeError: fetch failed
cause: Error: getaddrinfo ENOTFOUND my-registry.example.com
or
Error: Can't fetch registryURL: https://my-registry.example.com
Caused by: NetworkError: Network request failed (timeout after 30s)

### Screenshots

..

### How to Reproduce

its normal any error in registryValidation during URL validation but discards the orignal error information .

### 🖥️ Device Information [optional]

- Operating System (OS):
- Browser:
- Browser Version:

### 👀 Have you checked for similar open issues?

- [x] I checked and didn't find similar issue

### 🏢 Have you read the Contributing Guidelines?

- [x] I have read the [Contributing Guidelines](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)

### Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.