Skip to content

Commit 9c7ea26

Browse files
ShouldThrowServiceExceptionOnRetrieveByIdAsyncIfServiceErrorOccursAndLogItAsync -> PASS
1 parent 122dd10 commit 9c7ea26

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
@@ -78,6 +78,18 @@ public async ValueTask<Reader> RetrieveReaderByIdAsync(Guid readerId)
7878

7979
throw readerDependencyException;
8080
}
81+
catch (Exception exception)
82+
{
83+
var failedReaderServiceException =
84+
new FailedReaderServiceException(exception);
85+
86+
var readerServiceException =
87+
new ReaderServiceException(failedReaderServiceException);
88+
89+
this.loggingBroker.LogError(readerServiceException);
90+
91+
throw readerServiceException;
92+
}
8193
}
8294
}
8395
}

0 commit comments

Comments
 (0)