git ssb

0+

cel / ssb-wikimedia



Commit fc9566b3a2c93fc5f470b663a3be05ff99b640f6

Add more output for HTTP failures

cel committed on 12/1/2019, 5:38:10 AM
Parent: d66bbc88625c75a18132a506bcd522775047b1c9

Files changed

bin.jschanged
bin.jsView
@@ -58,9 +58,12 @@
5858 + (userAgentBot ? ' bot' : '')
5959 }
6060 var h = opts.protocol === 'https:' ? https : http
6161 h.get(opts, function (res) {
62- if (res.statusCode !== 200) return cb(new Error('HTTP ' + res.statusCode + ' ' + res.statusMessage))
62 + if (res.statusCode !== 200) {
63 + console.error(res.headers, url)
64 + return cb(new Error('HTTP ' + res.statusCode + ' ' + res.statusMessage))
65 + }
6366 var bufs = []
6467 res.on('data', function (buf) {
6568 bufs.push(buf)
6669 })

Built with git-ssb-web