|
Ran
|
Jobs
3
|
Files
1044
|
Run time
2min
|
Badge
README BADGES
|
push
github
fix(rust): fix error formatting (#2471) ## Problem The error format is pretty confusing: ``` $ agama --insecure --host 'https:/localhost' auth login > Please enter the root password: ******** Error: error sending request for url (https://https/localhost/api/auth): client error (Connect): dns error: failed to lookup address information: Name or service not known: failed to lookup address information: Name or service not known ``` ## Solution Although far from ideal, introducing a minimal change makes it more readable (kind of): ``` $ agama --insecure --host 'https://localhost' auth login` > Please enter the root password: ******** error sending request for url (https://localhost/api/auth) Caused by: 0: client error (Connect) 1: tcp connect error: Connection refused (os error 111) 2: Connection refused (os error 111) ``` ## Now what? Now we need to invest in improving the error messages. As you can see, the following one looks repetitive: ``` Retrieving data from URL http://192.168.122.1/agama/scripts.jsonnets Caused by: 0: Could not retrieve 'http://192.168.122.1/agama/scripts.jsonnets': [22] HTTP response code said error (The requested URL returned error: 404) 1: [22] HTTP response code said error (The requested URL returned error: 404) ``` Just a [minor change](08271203c) helps to get a better message: ``` Retrieving data from URL http://192.168.122.1/agama/scripts.jsonnets Caused by: 0: Could not retrieve http://192.168.122.1/agama/scripts.jsonnets 1: [22] HTTP response code said error (The requested URL returned error: 404) ``` ## Testing - *Tested manually*
1861 of 3413 branches covered (54.53%)
Branch coverage included in aggregate %.
21733 of 27572 relevant lines covered (78.82%)
61.7 hits per line
| ID | Flag name | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|---|
| 1 | rust | 15919434531.1 | 172 |
22.0 |
GitHub Action Run | |
| 3 | web | 15918913302.3 | 536 |
67.73 |
GitHub Action Run | |
| 3 | service | 15901238010.3 | 385 |
88.56 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|