Skip to content

Commit d67223d

Browse files
ShouldThrowServiceExceptionOnRemoveIfExceptionOccursAndLogItAsync -> PASS
1 parent bd58442 commit d67223d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

LibraryManagement.Api/Services/Foundations/Readers/ReaderService.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,18 @@ public async ValueTask<Reader> RemoveReaderByIdAsync(Guid readerId)
117117

118118
throw readerDependencyException;
119119
}
120+
catch (Exception exception)
121+
{
122+
var failedReaderServiceException =
123+
new FailedReaderServiceException(exception);
124+
125+
var readerServiceException =
126+
new ReaderServiceException(failedReaderServiceException);
127+
128+
this.loggingBroker.LogError(readerServiceException);
129+
130+
throw readerServiceException;
131+
}
120132
}
121133
}
122134
}

0 commit comments

Comments
 (0)