Better error message when --server is not specified

Open Beginner friendly
#402 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
cli

Research direction

Start by reproducing a tabcmd command without --server and trace how the default http://localhost value reaches the connection error, especially around the /api/2.4/auth/signin request. Update the CLI’s error path so the missing server is identified and the user receives a --server hint; done means the raw connection error is replaced or wrapped with a clear message.

Written by the indexing model from the issue text.

Description

bug

When a user runs any tabcmd command without specifying --server, the default http://localhost is used silently and they see a raw connection error:

HTTPConnectionPool(host='localhost', port=80): Max retries exceeded with url: /api/2.4/auth/signin (Caused by NewConnectionError(...Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it...))

This is confusing for users who simply forgot to provide a server URL. The fix should detect that the server value is still the default http://localhost (or that no server was explicitly provided) and print a clear, user-friendly message such as:

No server URL specified. Please provide one with --server <url>.

Or at minimum, wrap the connection error with a hint about --server.

Dominant language
Python
Stars
52
Forks
17
Avg merge
3d 8h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tableau/tabcmd

All issues in tableau/tabcmd

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.