Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reducer events are not getting called for failed reducers #126

Open
aasoni opened this issue Sep 6, 2024 · 1 comment
Open

Reducer events are not getting called for failed reducers #126

aasoni opened this issue Sep 6, 2024 · 1 comment
Assignees

Comments

@aasoni
Copy link
Contributor

aasoni commented Sep 6, 2024

After upgrading to version 0.11 reducer events and the SpacetimeDBClient.instance.onUnhandledReducerError are not getting called for failed reducers.

Example:

Reducer.OnUserCreateEvent += Reducer_OnUserCreateEvent;
Reducer.UserCreate(); // If this reducer fails `Reducer_OnUserCreateEvent` should get called but neither is is
@aasoni aasoni changed the title Reducer events and the onUnhandledReducerError event are not getting called for failed reducers Reducer events are not getting called for failed reducers Sep 6, 2024
@RReverser
Copy link
Member

from a few min looking at Git blame, looks like this might've been broken in the Protobufectomy PR.

before that change reducerEvent (which is checked and used later for sending out events) was parsed & assigned on any transaction update:

var dbEvent = message.TransactionUpdate.Event;
try
{
dbEvent.FunctionCall.CallInfo = ReducerEventFromDbEvent(dbEvent);
}
catch (Exception e)
{
Logger.LogException(e);
}

whereas now it's only parsed & assigned on successful transaction update:

// Convert the generic event arguments in to a domain specific event object
try
{
reducerEvent = ReducerEventFromDbEvent(transactionUpdate);
}
catch (Exception e)
{
Logger.LogException(e);
}
break;
case UpdateStatus.Failed(var failed):
break;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants