error handling in view posts