public ActionResult GetBlogPosts(string tag) { try { BlogPosts blogPost = _blogLogic.GetBlogsByTags(tag); if (blogPost == null) { return(new BadRequestResult()); } return(Ok(blogPost)); } catch (ArgumentNullException ex) { return(BadRequest(ex.Message)); } catch (ArgumentOutOfRangeException ex) { return(BadRequest(ex.Message)); } catch (Exception) { throw; } }