Commit 8158e9b2 authored by Tony Tam's avatar Tony Tam
Browse files

fix for #310

parent 1b662db2
......@@ -55,12 +55,12 @@
error: function(response) {
if (_this.url.substring(0, 4) !== 'http') {
return _this.fail('Please specify the protocol for ' + _this.url);
} else if (error.status === 0) {
} else if (response.status === 0) {
return _this.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.');
} else if (error.status === 404) {
} else if (response.status === 404) {
return _this.fail('Can\'t read swagger JSON from ' + _this.url);
} else {
return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.url);
return _this.fail(response.status + ' : ' + response.statusText + ' ' + _this.url);
}
},
response: function(rawResponse) {
......
......@@ -55,12 +55,12 @@
error: function(response) {
if (_this.url.substring(0, 4) !== 'http') {
return _this.fail('Please specify the protocol for ' + _this.url);
} else if (error.status === 0) {
} else if (response.status === 0) {
return _this.fail('Can\'t read from server. It may not have the appropriate access-control-origin settings.');
} else if (error.status === 404) {
} else if (response.status === 404) {
return _this.fail('Can\'t read swagger JSON from ' + _this.url);
} else {
return _this.fail(error.status + ' : ' + error.statusText + ' ' + _this.url);
return _this.fail(response.status + ' : ' + response.statusText + ' ' + _this.url);
}
},
response: function(rawResponse) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment