Fix error handling in system setting API

This patch fixes error handling when system setting get/set
property fails.