Fixed 500 issue in delete resoure and getUserAvailability APIs