Added basic error catching and responses to POST, PUT and DELETE handlers