-
-
Notifications
You must be signed in to change notification settings - Fork 318
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug.
When the CLI is executed with a --registry-url that is unreachable (e.g., a blackholed IP), the command hangs indefinitely instead of failing fast.
Root cause is in:
cli/src/utils/generate/registry.ts
Function:
registryValidation()
Problematic code:
await fetch(registryUrl as string);
Issues:
- No timeout
- No AbortController
- Uses default GET instead of lightweight HEAD
- Swallows original network error
- Blocks CLI execution indefinitely
This causes:
- CLI freeze
- CI pipeline stalls
- Poor UX
- No actionable error feedback
Expected behavior
CLI should:
- Fail fast (e.g., 3–5s timeout)
- Display meaningful error message
- Exit cleanly
Screenshots
How to Reproduce
Run:
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template \
--registry-url http://10.255.255.1
CLI will hang instead of exiting with an error.
🖥️ Device Information [optional]
- Operating System (OS):Windows(WSL)
- Browser:
- Browser Version:
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
To Triage