Check if we get IPv6 when enabling
This commit is contained in:
@@ -9,7 +9,6 @@ exports = module.exports = {
|
||||
const assert = require('assert'),
|
||||
BoxError = require('../boxerror.js'),
|
||||
debug = require('debug')('box:sysinfo/generic'),
|
||||
promiseRetry = require('../promise-retry.js'),
|
||||
safe = require('safetydance'),
|
||||
superagent = require('superagent');
|
||||
|
||||
@@ -27,7 +26,7 @@ async function getServerIPv4(config) {
|
||||
|
||||
if (networkError || response.status !== 200) {
|
||||
debug('getServerIPv4: Error getting IP', networkError);
|
||||
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to detect IPv4. API server unreachable');
|
||||
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to detect IPv4. API server (ipv4.api.cloudron.io) unreachable');
|
||||
}
|
||||
|
||||
if (!response.body && !response.body.ip) {
|
||||
@@ -52,7 +51,7 @@ async function getServerIPv6(config) {
|
||||
|
||||
if (networkError || response.status !== 200) {
|
||||
debug('getServerIPv6: Error getting IP', networkError);
|
||||
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to detect IPv6. API server unreachable');
|
||||
throw new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to detect IPv6. API server (ipv6.api.cloudron.io) unreachable');
|
||||
}
|
||||
|
||||
if (!response.body && !response.body.ip) {
|
||||
|
||||
Reference in New Issue
Block a user