-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: [ { Code: [Object], Message: [Object] } ], #71
Comments
Hi! |
I am building a Meteor application that will take a search input from the user and use Amazon's itemSearch operation to find and return information about the book( I would like its ISBN, title, and author for now). I created a Meteor method to do so and when the user enters submit on the search form ,I believe I call the method. Here is my meteor method code: Meteor.methods({
itemSearch(title, author) {
console.log("title:" + title);
console.log("author:" + author);
client.itemSearch({
title: title,
author: author,
searchIndex: 'Books',
responseGroup: 'ItemAttributes,Offers,Images,Small'
}).then(function(results){
console.log(results);
}).catch(function(err){
console.log(err);
});
}
}); Here is my javascript code in response to a user submitting the search form: Template.bookSearch.events({
'submit form' ( event, template ) {
event.preventDefault();
var title = event.target.title.value;
var author = event.target.author.value;
console.log("title = " + title);
console.log("author = " + author);
Meteor.call( 'itemSearch', title, author, ( error, response ) => {
if ( error ) {
Bert.alert( error.reason, 'danger' );
} else {
Bert.alert( 'itemSearch was called', 'success' );
}
});
}
}) I am getting the alert saying that itemSearch was called successfully, so I think I am accessing the api . I don't understand what the error message I'm getting means however. |
The code looks good. Can you make sure the credentials are valid? |
Hello,
I implemented this meteor package and I am getting this error message.
Why is this occuring?
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: