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

Open Beginner friendly
#2,013 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
cli

Research direction

Start in src/utils/generate/registry.ts at the registryValidation function and inspect how errors from registry URL validation are currently handled. Reproduce a validation failure such as a network, DNS, SSL, or proxy error, then verify that the resulting message preserves the underlying error details and cause.

Written by the indexing model from the issue text.

Description

bug stale
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?
  • I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Dominant language
TypeScript
Stars
274
Forks
376
Avg merge
12h 11m
Merged PRs (30d)
11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from asyncapi/cli

All issues in asyncapi/cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.