You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If SQL insert statement fails, the same exception code is raised - WrongExpectedVersion - and the initial error is not returned to the application.
declare @p5 Web.NewEventStoreEvents
insert into @p5 values('D318360C-CBF7-42DB-843E-730D2D85668A',N'{"ReceivedEvent":{"PartnerId":33608627,"Params":[{"Item1":"TriggeredByDocumentPartnerId","Item2":"54102"}]},"ReceivedEventType":"Charisma.Leasing.PublishedLanguage.Events.Partner.MasterPartnerConsentUpdated"}','NBB.ProcessManager.Runtime.Events.EventReceived, NBB.ProcessManager.Runtime','FBF236D4-1A6D-430C-915F-756F4D341B7C')
exec sp_executesql N'declare @NewEventsCount int
select @NewEventsCount = count(*) from @NewEvents
if @NewEventsCount = 0
begin
return;
end
declare @ActualVersion int
select @ActualVersion = count(*) from EventStoreEvents where StreamId = @StreamId
if @ActualVersion <> @ExpectedVersion
BEGIN
RAISERROR(''WrongExpectedVersion'', 16, 1);
RETURN;
END
BEGIN TRY
insert into EventStoreEvents(EventId, EventData, EventType, CorrelationId, StreamId, StreamVersion)
select EventId, EventData, EventType, CorrelationId, @StreamId, @ExpectedVersion + OrderNo
from @NewEvents
END TRY
BEGIN CATCH
RAISERROR(''WrongExpectedVersion'', 16, 1);
END CATCH
',N'@StreamId varchar(200),@ExpectedVersion int,@NewEvents [NewEventStoreEvents] READONLY',@StreamId='Deimos.Worker.Processes.PartnerSyncProcess:NBB.Core.Effects.Unit:33608627',@ExpectedVersion=95,@NewEvents=@p5
The text was updated successfully, but these errors were encountered:
If SQL insert statement fails, the same exception code is raised - WrongExpectedVersion - and the initial error is not returned to the application.
The text was updated successfully, but these errors were encountered: