function _printError(res, next, err, errFuncName) {
  console.error('On ' + errFuncName + ': - no connection');
  if (err) {
    console.error('Got error ' + JSON.stringify(err));
    return (typeof next === 'function') ? next(err) : res.send('ERROR: Invalid Connection: ' + JSON.stringify(err));
  }
  else {
    return res.status(404).end('Not Found');
  }
}
print error message server side and return an HTTP page with text error message to the client.

@param res Express response object
@param next Express next middleware function
@param err optional error objet to extract error message from for logging
@param errFuncName name of function or url the error occured
@return {*}