This commit is contained in:
Tony Tam
2013-09-14 20:43:20 -07:00
parent 1b662db2d2
commit 8158e9b25f
2 changed files with 6 additions and 6 deletions

6
dist/lib/swagger.js vendored
View File

@@ -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) {

View File

@@ -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) {