fixed error handling in handleHttpPOSTRespone callback