Permalink
Browse files

Added error handling.

  • Loading branch information...
1 parent 16bda57 commit a883b005b74b51813d84f1ae09c704ffee521edd @rishabhsrao committed Dec 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/main.js
View
@@ -18,7 +18,7 @@ jQuery(document).ready(function() {
self.getItems = function() {
jQuery.ajax({
- url: "http://www.tastekid.com/ask/ws",
+ url: "http://www.tastekid.com/ask/wsa",
type: "GET",
dataType: "jsonp",
async: true,
@@ -58,6 +58,8 @@ jQuery(document).ready(function() {
});
self.items.push(item);
}
+ } else {
+ console.error("No data fetched from server.");
}
}
});

0 comments on commit a883b00

Please sign in to comment.