Commands timing out produces very ugly and inconsistent error messages
- Dominant language
- Go
- Stars
- 17.1k
- Forks
- 3.2k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 11
Description
I get:
```
Error: Post http://127.0.0.1:5001/api/v0/name/publish?arg=QmShyawfbYCT6ZMDawg8C8dmhSh4UWXGFfjHvqMfB8npny&encoding=json&key=self&lifetime=24h&resolve=true&stream-channels=true&timeout=1s: context deadline exceeded
```
Sometimes, and other times just:
```
Error: context deadline exceeded
```
Both of these are ugly (should just say command timed out) or something. I think the first one is caused by the server timing out and closing the connection, and the second one is the client beating the server to the punch.
cc @keks
Contributor guide
Research direction
Reproduce the timeout against the CLI and the /api/v0/name/publish endpoint, checking both the server-closing-connection case and the client deadline case. Trace where each error reaches the command output, then verify that both paths produce one consistent, user-friendly timeout message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100