Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 20, 2014 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/4767cea459357ea252fa to your computer and use it in GitHub Desktop.
Save devdays/4767cea459357ea252fa to your computer and use it in GitHub Desktop.
Single Page App - Handling Errors Retrieving Data in Amplify
amplify.request({
resourceId: "easyData",
success: function (data, status) {
$("#products").text(data.products).show();
},
error: function (data, status) {
if (status === "abort") {
console.log("loading aborted");
}
else {
console.log("error loading products " + status);
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment