handle non-existing post in post.js