Improvements to throwError method in parseRestClient class