Skip to content

fix: add 10s timeout to registryValidation to prevent indefinite hang#2047

Open
zhaog100 wants to merge 2 commits intoasyncapi:masterfrom
zhaog100:fix/registry-timeout
Open

fix: add 10s timeout to registryValidation to prevent indefinite hang#2047
zhaog100 wants to merge 2 commits intoasyncapi:masterfrom
zhaog100:fix/registry-timeout

Conversation

@zhaog100
Copy link

Fixes #2027

Adds AbortController with 10s timeout to prevent CLI hang on unreachable registry URLs.

Related: #2039

Resolves asyncapi#2027: CLI hangs when --registry-url points to unreachable host.

- Uses AbortController with 10s timeout for fetch()
- Provides clear error message when timeout occurs
- Distinguishes timeout errors from other fetch errors

Fixes asyncapi#2027
@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2026

🦋 Changeset detected

Latest commit: e8ef44a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@asyncapi/cli Patch

Not sure what this means? Click here to learn what changesets are.

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

@sonarqubecloud
Copy link

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.

[BUG] CLI hangs indefinitely when --registry-url points to an unreachable host (no timeout handling)

1 participant