Skip to content

Encode WebSocket stream URL and keep API key out of invalid-URL error… - #36

Merged
himanshu-gtm merged 1 commit into
mainfrom
new_updates
Nov 26, 2026
Merged

himanshu-gtm merged 1 commit into
mainfrom
new_updates

Conversation

@himanshu-gtm

Copy link
Copy Markdown
Collaborator

…s; bump version to 0.4.3

  • Build the stream URL with urlencode(quote_via=quote), so a registration_id containing '#', '&', '%' or spaces reaches the server intact.
  • stream() and stream_async() catch websockets' InvalidURI (whose message holds the full URL, API key included) and raise NewsdataWebSocketError naming only the base URL, without chaining. It is never retried.
  • Add tests for the URL encoding and the invalid-URL error (sync and async).

…s; bump version to 0.4.3

- Build the stream URL with urlencode(quote_via=quote), so a registration_id
  containing '#', '&', '%' or spaces reaches the server intact.
- stream() and stream_async() catch websockets' InvalidURI (whose message holds
  the full URL, API key included) and raise NewsdataWebSocketError naming only
  the base URL, without chaining. It is never retried.
- Add tests for the URL encoding and the invalid-URL error (sync and async).
@himanshu-gtm
himanshu-gtm merged commit 487e999 into main Nov 26, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant