Skip to content

Commit b7222bc

Browse files
fixes :|
1 parent 264ea08 commit b7222bc

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Shared.EventStore/Aggregate/DomainEventFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public DomainEvent CreateDomainEvent(Guid aggregateId, ResolvedEvent @event)
4848
}
4949

5050
if (eventType == null)
51-
throw new ApplicationException($"Failed to find a domain event with type {@event.Event.EventType}");
51+
throw new ArgumentException(($"Failed to find a domain event with type {@event.Event.EventType}");
5252

5353
DomainEvent domainEvent = (DomainEvent)JsonConvert.DeserializeObject(json, eventType);
5454

Shared.EventStore/SubscriptionWorker/SubscriptionRepository.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ public async Task<PersistentSubscriptions> GetSubscriptions(Boolean forceRefresh
8181
this.WriteTrace("Full refresh on repository");
8282

8383
Result<List<PersistentSubscriptionInfo>> list = await this.GetAllSubscriptions(cancellationToken);
84+
if (list.IsFailed) {
85+
this.WriteTrace(list.Message);
86+
return this.Subscriptions;
87+
}
8488

85-
// TODO: Log failure?
86-
this.FullRefreshHits++;
89+
this.FullRefreshHits++;
8790

8891
this.Subscriptions = this.Subscriptions.Update(list.Data);
8992

9093
this.WriteTrace($"Full refresh on repository completed {this.FullRefreshHits}");
9194

9295
return this.Subscriptions;
9396
}
94-
catch (Exception ex) {
95-
throw new ApplicationException($"Unable to get persistent subscription list. [{ex}]");
96-
}
9797
finally {
9898
Interlocked.Exchange(ref this.running, 0);
9999
}

0 commit comments

Comments
 (0)