fix: add timeout and HEAD method to registry URL validation#2089
fix: add timeout and HEAD method to registry URL validation#2089Pyiner wants to merge 1 commit intoasyncapi:masterfrom
Conversation
…syncapi#2027) Add AbortController with 5-second timeout to the fetch call in registryValidation() so the CLI no longer hangs indefinitely. Switch from GET to HEAD for a lighter validation request, and surface distinct error messages for timeout vs general network failures. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
There was a problem hiding this comment.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
|



Summary
Fixes #2027 — CLI hangs indefinitely when
--registry-urlpoints to an unreachable host.Changes:
registryValidation()insrc/utils/generate/registry.tsclearTimeoutinfinallyblock prevents timer leaksBefore:
After:
Testing: