Commit 1eebfe2
committed
fix(cortex-cli): show user-friendly error for invalid --host value
Fixes bounty issue #1559
When running 'cortex acp --host not.valid', the command previously showed a
raw syntax error 'invalid socket address syntax'. This change validates the
host parameter as a valid IP address before attempting to parse it and
provides a clear error message with expected format hint.1 parent 8f839ec commit 1eebfe2
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
0 commit comments