whois-cli icon indicating copy to clipboard operation
whois-cli copied to clipboard

Handling Errors When Spaceship.com’s WHOIS Server is Unreachable

Open QuietJoon opened this issue 4 months ago • 1 comments

Hello,

I’ve been encountering errors with the WHOIS client when querying domains registered through Spaceship.com's and/or Porkbun's WHOIS server. It seems the client fails to handle cases where Spaceship.com’s WHOIS server is unreachable or returns an unexpected response. Here are the error messages I’ve received:

an error occurred while querying the whois server (domain=mujun.cafe, servers=[]): whois: connect to whois server failed: dial tcp: address tcp///www.spaceship.com/domains/whois: unknown port
Error: Failed to retrieve data for domain 'mujun.cafe'.

an error occurred while querying the whois server (domain=namu.systems, servers=[]): whois: connect to whois server failed: dial tcp: address tcp///www.spaceship.com/domains/whois: unknown port
Error: Failed to retrieve data for domain 'namu.systems'.

an error occurred while querying the whois server (domain=namu.works, servers=[]): whois: connect to whois server failed: dial tcp: address tcp///www.spaceship.com/domains/whois: unknown port
Error: Failed to retrieve data for domain 'namu.works'.

I understand that the root cause is an issue with Spaceship.com’s and/or Porkbun WHOIS server, and not a fault of your whois client per se. However, I believe it would be beneficial if the client could handle such scenarios more gracefully.

I tried Specifiable whois server to query option, but because it have query limit (I haven't tried yet, but I handles about 40 domains, it may reaches limit)

Preferred Behavior

  • (I have no idea why interacting with some WHOIS servers fails, but) Covers some irregular WHOIS server.
  • Provide weak whois server specification option. Try default(?) whois server first, but when fails tries with given/specified whois server.

Steps to Reproduce:

1.	Use the WHOIS client to query any domain registered with Spaceship.com (e.g., `whois monopole.center`).
2.	Observe the error message regarding failure to connect to the WHOIS server. (maybe port isssue?)

Environment:

•	WHOIS client version: [v0.0.5]

Thank you for your consideration. Your work really helps me.

QuietJoon avatar Oct 07 '24 10:10 QuietJoon