Permalink
Browse files

[fix] Handle 503 errors when cloud is at capacity.

  • Loading branch information...
1 parent b39b7fd commit 0bae48e0d6fdfcabf6eb12b3f9a9c1544cb00ef5 @AvianFlu AvianFlu committed Apr 10, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/jitsu.js
View
@@ -261,6 +261,14 @@ jitsu.showError = function (command, err, shallow, skip) {
jitsu.log.error('403 ' + err.result.error);
}
+ else if (err.statusCode === '503') {
+ if (err.result && err.result.message) {
+ jitsu.log.error(err.result.message);
+ }
+ else {
+ jitsu.log.error('The Nodejitsu cloud is currently at capacity. Please try again later.');
+ }
+ }
else if (!skip) {
jitsu.log.error('Error running command ' + command.magenta);

0 comments on commit 0bae48e

Please sign in to comment.