Set loggly api response to empty object if it's undefined to avoid crashing when accessing res.statusCode