Skip to content

Commit

Permalink
Update ResourceAcquiredListener.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
edward-miller-lcg committed Aug 5, 2024
1 parent f5b26e4 commit aff2514
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DotNet/Normalization/Listeners/ResourceAcquiredListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ await kafkaConsumer.ConsumeWithInstrumentation(async (result, CancellationToken)
try
{
config = await configManager.SingleOrDefaultAsync(c => c.FacilityId == messageMetaData.facilityId, cancellationToken);

if (config == null)
{
throw new NoEntityFoundException("Config for facilityId does not exist.");
}
}
catch(DbContextNullException ex)
{
Expand Down

0 comments on commit aff2514

Please sign in to comment.