fix: add timeout and HEAD method to registry URL validation#2073
fix: add timeout and HEAD method to registry URL validation#2073DrGalio wants to merge 1 commit intoasyncapi:masterfrom
Conversation
Previously, registryValidation() called fetch() without any timeout or abort mechanism. When --registry-url pointed to an unreachable host (e.g. a blackholed IP), the CLI would hang indefinitely. Changes: - Add AbortController with 5-second timeout - Use HEAD instead of GET for lightweight connectivity check - Surface timeout-specific error message for actionable feedback - Preserve existing error paths (auth error, generic fetch failure) Fixes asyncapi#2027
|
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.
|



Fixes #2027
Problem
When
--registry-urlpoints to an unreachable host (e.g. a blackholed IP likehttp://10.255.255.1), the CLI hangs indefinitely becauseregistryValidation()callsfetch()without any timeout or abort mechanism.Changes
AbortControllerwith a 5-second timeout toregistryValidation()Registry URL timed out after 5s: <url>finallyblockTesting
Related