Service call issue

Hey everyone, I’m develop a app with calling rest service. I want to submit the some data by using service call. In submission of data if there is any error (means loading time out exceeds ) i’m showing an popup msg. Again i want to submit again service is not called. Please help to solve this Issue