Skip to content

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

Merged
sujal-maheshwari2004 merged 1 commit into
priompt:mainfrom
karanthashika:fix-nats-default-port
Nov 18, 2026
Merged

sujal-maheshwari2004 merged 1 commit into
priompt:mainfrom
karanthashika:fix-nats-default-port

Conversation

@karanthashika

Copy link
Copy Markdown
Contributor

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.

@sujal-maheshwari2004 sujal-maheshwari2004 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally; tests pass. Thanks!

@sujal-maheshwari2004
sujal-maheshwari2004 merged commit 0446cdb into priompt:main Nov 18, 2026
1 check 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.

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

2 participants