Skip to content

Fix NATS connection error showing port None when URL has no port - #33

Open
karanthashika wants to merge 1 commit into
priompt:mainfrom
karanthashika:fix-nats-default-port
Open

karanthashika wants to merge 1 commit into
priompt:mainfrom
karanthashika:fix-nats-default-port

Conversation

@karanthashika

Copy link
Copy Markdown

Issue

Fixes #25

What changed

  • Fixed a bug where NATS connection error messages displayed :None for the port when no explicit port was provided in the connection URL.
  • Updated priompt_sdk/client.py to use {u.port or 4222} so it falls back cleanly to the standard NATS port (4222) if omitted.
  • Ensured sensitive authentication tokens remain masked and are never echoed in connection error strings.

How I tested it

  • Added a new unit test test_subscribe_nats_default_port in tests/test_client.py covering default port fallback, explicit port preservation, and token secrecy.
  • Ran the test suite locally using pytest -q and verified all 29 tests passed successfully.

This branch has not been deployed

No deployments
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.

NATS connection errors show port "None" when the URL has no port

1 participant