public async Task <IHttpActionResult> Delete([FromUri] Guid jobId) { try { Guid userId = RoboBrailleProcessor.getUserIdFromJob(this.Request.Headers.Authorization.Parameter); jobId = await RoboBrailleProcessor.DeleteJobFromDb(jobId, userId, _repository.GetDataContext()); return(Ok(jobId.ToString("D"))); } catch (Exception e) { var resp = new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent(string.Format("Internal error: {0}", e)), ReasonPhrase = e.Message }; throw new HttpResponseException(resp); } }