 <blockquote> <p>When i click "Cook" it shows an alert "Error occurred [object Object]".</p> </blockquote> <p>The alert method can not display object structures, so you just get <code>[object Object]</code> in that debug attempt.</p> <p>Use <code>console.log(response.error)</code> instead, and then have a look into your browser’s JavaScript console to see what the actual error is.</p>