@oliverio: Ja, im Code habe ich es richtig drin, das error.response.data Objekt ist dann auf dem Produktivsystem tatsächlich einfach nur leer.
.catch((error) => {
this.setState('info.connection', false, true);
if (error.response) {
// The request was made and the server responded with a status code
// that falls out of the range of 2xx
this.log.error(`Response: ${JSON.stringify(error.response.data)}`);
this.log.error(`Status: ${JSON.stringify(error.response.status)}`);
this.log.error(`Headers: ${JSON.stringify(error.response.headers)}`);
} else if (error.request) {
// The request was made but no response was received
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
// http.ClientRequest in node.js
this.log.error(`Request: ${error.request}`);
} else {
// Something happened in setting up the request that triggered an Error
this.log.error(`Error: ${error.message}`);
}
this.log.error(`Config: ${JSON.stringify(error.config)}`);
});
Logs:
Mit node-fetch läuft es aber jetzt zumindest.