While following the ‘feetching data from the server’ learning page, in the section ‘a more complex example’, I have noticed that the source code, and the code in the ZIP file called ‘the can-store ZIP file’ are not the same.
Therefore, when trying to attempt loading the files in my browser (currently using Chrome) and testing the case fail (following the .catch() to handle an error in the tutorial), the example does not work. Am I correct on this? Am I doing something wrong?
Hi @krast84! Sorry for taking so long to get to this one.
I just tried this. I downloaded the can-store.zip, uncompressed it, ran the code in a local web server, then went into the JS and changed the following line:
fetch('products.json').then(function(response) {
so that “products.json” is misspelt.
when I do this, I get an error in my console of “Network request for producs.json failed with response 404: File not found”, or whatever.