throw ApiException rather than returning new dummy instance of return type

This commit is contained in:
Collin M. Barrett 2019-07-05 14:29:39 -05:00
parent 06c42e72bc
commit 6ad5cedfab

View file

@ -43,7 +43,7 @@ public async Task<IReadOnlyList<Issue>> GetAllIssues(RepositoryIssueRequest repo
catch (ApiException ex)
{
_logger.LogError(ex, $"Failed getting all Issues{ExceptionMessageSuffix}");
return new List<Issue>();
throw;
}
}
@ -57,7 +57,7 @@ public async Task<Issue> CreateIssue(NewIssue newIssue)
catch (ApiException ex)
{
_logger.LogError(ex, $"Failed creating Issue{ExceptionMessageSuffix}");
return new Issue();
throw;
}
}
@ -71,7 +71,7 @@ public async Task<Issue> UpdateIssue(int issueNumber, IssueUpdate issueUpdate)
catch (ApiException ex)
{
_logger.LogError(ex, $"Failed updating Issue{ExceptionMessageSuffix}");
return new Issue();
throw;
}
}
}