i have this error Uncaught (in promise) TypeError: Failed to fetch

Viewed 1177

I am sorry if I asking alot but i need help. I used this script it is worked ok but in console i have this error :{Uncaught (in promise) TypeError: Failed to fetch} can any one to tell me where is my mistake.

fetch('/feeds/posts/default?alt=json')
.then(response => response.json())
.then(data => {
  var authorPosts = data.feed.entry.filter(e => e.author[0].name.$t === "mark wael");
  var len=authorPosts.length;
  console.log(len);
  $(".authorPostsCount").append(len);
});
------------------
<span class='authorPostsCount'/>

thanks for any help

1 Answers
Related