public async Task <DeleteStepArtifactResponse> Delete(DeleteStepArtifactRequest request) { if (!await batchRepository.DoesBatchExist(request.BatchId)) { throw Err.BatchNotFound(request.BatchId); } var step = await stepRepository.Get(request.BatchId, request.StepName); if (step == null) { throw Err.StepNotFound(request.StepName); } var existingStepArtifact = await stepRepository.GetStepArtifact(step.Id, request.ArtifactName); if (existingStepArtifact == null) { throw Err.StepArtifactNotFound(request.ArtifactName); } await stepRepository.DeleteStepArtifact(existingStepArtifact.Id); return(new DeleteStepArtifactResponse()); }