public bool DeleteHIT(string hitID) { try { client.DisposeHIT(hitID); } catch (Amazon.WebServices.MechanicalTurk.Exceptions.ObjectDoesNotExistException) { return(true); } catch (Amazon.WebServices.MechanicalTurk.Exceptions.InvalidStateException e) { if (e.Message.Contains("'Disposed'")) { return(true); } if (e.Message.Contains("'Reviewable'")) { return(false); } // should never reach here return(false); } catch (Exception) { // should never reach here return(false); } return(true); }