mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-26 00:29:35 -04:00
Added another error type to DNS fallback
This commit is contained in:
1 parent
594e2a54c0
commit
75275201ed
3 files changed
+10
-5
No files matched your search
@@ -109,7 +109,12 @@ export function _actuallySend (renderedRequest, settings, forceIPv4 = false) {
|
||||
const isShittyParseError = err.toString() === 'Error: Parse Error';
|
||||
|
||||
// Failed to connect while prioritizing IPv6 address, fallback to IPv4
|
||||
if (!forceIPv4 && err.code === 'ECONNREFUSED') {
|
||||
const isNetworkRelatedError = (
|
||||
err.code === 'ECONNREFUSED' || // Could not talk to server
|
||||
err.code === 'ENETUNREACH' // Could not access the network
|
||||
);
|
||||
|
||||
if (!forceIPv4 && isNetworkRelatedError) {
|
||||
console.log('-- Falling back to IPv4 --');
|
||||
_actuallySend(renderedRequest, settings, true).then(resolve, reject);
|
||||
return;
|
||||
|
||||
+2
-2
@@ -22,11 +22,11 @@
|
||||
"nedb": "^1.8.0",
|
||||
"node-forge": "^0.6.43",
|
||||
"node-uuid": "^1.4.7",
|
||||
"nunjucks": "git@github.com:gschier/nunjucks.git#80485468cd577f1a1a8067bedf6c5bfa878712ea",
|
||||
"nunjucks": "git@github.com:getinsomnia/nunjucks.git#80485468cd577f1a1a8067bedf6c5bfa878712ea",
|
||||
"raven": "^0.12.1",
|
||||
"request": "^2.71.0",
|
||||
"sjcl": "^1.0.6",
|
||||
"srp": "git@github.com:gschier/node-srp.git#5dfcdba97e3661ba1119cadbc4e9723c6b4bc1fb",
|
||||
"srp": "git@github.com:getinsomnia/node-srp.git#6ebd8c3acfbcf69645e4c6e6f8f6b55138ff22c3",
|
||||
"tough-cookie": "^2.3.1",
|
||||
"traverse": "^0.6.6",
|
||||
"vkbeautify": "^0.99.1",
|
||||
|
||||
+2
-2
@@ -73,7 +73,7 @@
|
||||
"nedb": "^1.8.0",
|
||||
"node-forge": "^0.6.43",
|
||||
"node-uuid": "^1.4.7",
|
||||
"nunjucks": "git@github.com:gschier/nunjucks.git#80485468cd577f1a1a8067bedf6c5bfa878712ea",
|
||||
"nunjucks": "git@github.com:getinsomnia/nunjucks.git#80485468cd577f1a1a8067bedf6c5bfa878712ea",
|
||||
"raven": "^0.12.1",
|
||||
"react": "^15.3.1",
|
||||
"react-dnd": "^2.1.4",
|
||||
@@ -86,7 +86,7 @@
|
||||
"redux-thunk": "^2.0.1",
|
||||
"request": "^2.74.0",
|
||||
"sjcl": "^1.0.6",
|
||||
"srp": "git@github.com:gschier/node-srp.git#5dfcdba97e3661ba1119cadbc4e9723c6b4bc1fb",
|
||||
"srp": "git@github.com:getinsomnia/node-srp.git#6ebd8c3acfbcf69645e4c6e6f8f6b55138ff22c3",
|
||||
"tough-cookie": "^2.3.1",
|
||||
"traverse": "^0.6.6",
|
||||
"vkbeautify": "^0.99.1",
|
||||
|
||||
Reference in new issue
Block a user