Skip to content

fix: add timeout, HEAD method, and meaningful errors to registryValidation#2109

Open
TeapoyY wants to merge 1 commit intoasyncapi:masterfrom
TeapoyY:fix/registry-timeout-v2
Open

fix: add timeout, HEAD method, and meaningful errors to registryValidation#2109
TeapoyY wants to merge 1 commit intoasyncapi:masterfrom
TeapoyY:fix/registry-timeout-v2

Conversation

@TeapoyY
Copy link
Copy Markdown

@TeapoyY TeapoyY commented Apr 8, 2026

Description

Adds a 5-second timeout to the registry URL validation to prevent the CLI from hanging indefinitely when the registry URL is unreachable.

Changes

Testing

Run: asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --registry-url http://10.255.255.1
CLI should fail within 5 seconds with a meaningful error instead of hanging indefinitely.

…ation

- Add 5-second AbortController timeout to prevent indefinite hangs
- Use HEAD instead of GET for lighter-weight validation
- Include original error message in thrown error for better debugging
- Handle AbortError specifically with clear timeout message

Fixes asyncapi#2027
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

⚠️ No Changeset found

Latest commit: f0039f4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

2 participants