Added an error message which is shown when the query for adding post to the database was not executed successfully.

Signed-off-by: Siddharth Kannan <kannan.siddharth12@gmail.com>