Skip to content

Commit

Permalink
Warn if API key is incorrect.
Browse files Browse the repository at this point in the history
  • Loading branch information
ammmir committed Aug 28, 2011
1 parent 4724ea4 commit 850b97a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ function flush_data_queue() {
}

var req = http.request(options, function(res) {
if(res.statusCode != 200) {
if(res.statuscode == 403) {
console.error('RESTalytics: incorrect API key, please go to http://restalytics.com/ and verify that it is correct.');
} else if(res.statusCode != 200) {
console.error('RESTalytics: unable to flush data. HTTP status: %d', res.statusCode);
console.error('RESTalytics: pending_data', pending_data);

Expand Down

0 comments on commit 850b97a

Please sign in to comment.