This is probably an issue on its own instead, but here we know if there is an error or not, but we don't return an error code.  Instead in the calling function we check for an exception being thrown, but couldn't the error just be that we get an invalid response code?  Seems like the user could get a message that the data was reset when it wasn't.