Steps to reproduce:
- set up Vagrant with the restbase role (I have seen this on a labs-vagrant instance; not sure if that matters)
- break restbase (in my case all the MediaWiki API URLs pointed to an invalid location)
- make a request to RESTBase
$ curl -v 'http://localhost:8000/proton-staging.wmflabs.org/v3/page/html/Book/10' * Hostname was NOT found in DNS cache * Trying ::1... * Connected to localhost (::1) port 8000 (#0) > GET /proton-staging.wmflabs.org/v3/page/html/Book/10 HTTP/1.1 > User-Agent: curl/7.38.0 > Host: localhost:8000 > Accept: */* > < HTTP/1.1 500 Internal Server Error < X-Powered-By: Express < Access-Control-Allow-Origin: * < Content-Type: text/html; charset=utf-8 < Content-Length: 5880 < ETag: W/"16f8-V/HhFrWKh3C/ucTblD4yFl81Wn4" < Vary: Accept-Encoding < Date: Tue, 05 Sep 2017 22:57:09 GMT < Connection: keep-alive < error: Config Request failure for "http://localhost/w/api.php": Error: connect ECONNREFUSED 127.0.0.1:80 path: /proton-staging.wmflabs.org/v3/page/html/Book/10
parsoid: Config Request failure for "http://localhost/w/api.php": Error: connect ECONNREFUSED 127.0.0.1:80
    at ConfigRequest.ApiRequest._requestCB (/vagrant/srv/parsoid/lib/mw/ApiRequest.js:415:15)
    at self.callback (/vagrant/srv/parsoid/node_modules/request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.onRequestError (/vagrant/srv/parsoid/node_modules/request/request.js:884:8)
    at emitOne (events.js:101:20)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1277:8)
    at&#* Connection #0 to host localhost left intact x20;_combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
The decoded text is
error: Config Request failure for "http://localhost/w/api.php": Error: connect ECONNREFUSED 127.0.0.1:80 path: /proton-staging.wmflabs.org/v3/page/html/Book/10 parsoid: Config Request failure for "http://localhost/w/api.php": Error: connect ECONNREFUSED 127.0.0.1:80 at ConfigRequest.ApiRequest._requestCB (/vagrant/srv/parsoid/lib/mw/ApiRequest.js:415:15) at self.callback (/vagrant/srv/parsoid/node_modules/request/request.js:188:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.onRequestError (/vagrant/srv/parsoid/node_modules/request/request.js:884:8) at emitOne (events.js:101:20) at ClientRequest.emit (events.js:188:7) at Socket.socketErrorListener (_http_client.js:310:9) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at emitErrorNT (net.js:1277:8) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)
which would presumable show up in a browser. The HTML encoding is pretty annoying when using curl, though.