Created
December 16, 2011 17:26
-
-
Save lxbarth/1487004 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapbox@mapbox2:~/tilemill$ git diff | |
diff --git a/commands/export.bones b/commands/export.bones | |
index e3b5286..c71dad6 100644 | |
--- a/commands/export.bones | |
+++ b/commands/export.bones | |
@@ -328,9 +328,12 @@ command.prototype.upload = function (callback) { | |
}, this); | |
}, function(err, resp, body) { | |
if (err) throw err; | |
- if (resp.statusCode !== 200) | |
- throw new Error('MapBox Hosting is not available. Status ' + resp.statusCode + '.'); | |
+ console.error(JSON.stringify(resp.headers)); | |
+ console.error(body); | |
+ if (resp.statusCode !== 200) { | |
+ throw new Error('MapBox Hosting is not available. Status ' + resp.statusCode + '.'); | |
+ } | |
// Let Step catch thrown errors here. | |
uploadArgs = JSON.parse(body); | |
key = uploadArgs.key; | |
@@ -365,9 +368,10 @@ command.prototype.upload = function (callback) { | |
'X_FILE_NAME': filename | |
} | |
}, function(resp) { | |
- if (resp.statusCode !== 303) | |
+ if (resp.statusCode !== 303) { | |
+ console.error(JSON.stringify(resp.headers)); | |
return this(new Error('S3 is not available. Status ' + resp.statusCode + '.')); | |
- | |
+ } | |
freeURL = resp.headers.location.split('?')[0]; | |
this(); | |
}.bind(this)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment