summaryrefslogtreecommitdiff
path: root/doc/todo/more_of_diagnostic_information_in_case_of_failures_into_returned_json/comment_2_82b851629c695084cbf62e2b636bcc91._comment
blob: 40935530e4a8aaf0a207d5f7af952f9705e5a6b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[[!comment format=mdwn
 username="joey"
 subject="""comment 2"""
 date="2017-02-20T19:15:18Z"
 content="""
In general, the --json output does include a "note" with any
available message about why an operation failed. 

Since wget outputs HTTP errors to stdout, there's no way to capture
the actual message for json, and so swiching to wget -nv won't improve
the json, since in json mode wget is run with -q.

It would not be hard to use a HTTP library and propagate the HTTP errors
into the json "note", but it might be hard to get resumption of partial
downloads to work as well with a HTTP library as it works with wget/curl.

What we could do is use curl in preference to wget in json mode; 
curl -s -S avoids all progress etc output and displays the
http errors to stderr.
""]]