Skip to content

Commit

Permalink
CODE RUB: Fixed merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdutoit authored Oct 5, 2024
1 parent 4454bfb commit 4ee7ed6
Showing 1 changed file with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,37 +77,11 @@ private async ValueTask<Repository> TryCatch(ReturningRepositoryFunction returni
}

private async ValueTask<IQueryable<Repository>> TryCatch(
ReturningRepositoriesFunction returningRepositoriesunction)
ReturningRepositoriesFunction returningRepositoriesFunction)
{
try
{
return await returningRepositoriesunction();
}
catch (SqlException sqlException)
{
var failedStorageRepositoryException = new FailedStorageRepositoryException(
message: "Failed repository storage error occurred, contact support.",
innerException: sqlException);

throw await CreateAndLogCriticalDependencyExceptionAsync(failedStorageRepositoryException);
}
catch (Exception exception)
{
var failedServiceRepositoryException =
new FailedServiceRepositoryException(
message: "Failed service repository error occurred, contact support.",
innerException: exception);

throw await CreateAndLogServiceExceptionAsync(failedServiceRepositoryException);
}
}

private async ValueTask<IQueryable<Repository>> TryCatch(
ReturningRepositoriesFunction returningRepositoriesunction)
{
try
{
return await returningRepositoriesunction();
return await returningRepositoriesFunction();
}
catch (SqlException sqlException)
{
Expand Down

0 comments on commit 4ee7ed6

Please sign in to comment.