Skip to content

Conversation

@adhami3310
Copy link
Member

No description provided.

@linear
Copy link

linear bot commented May 15, 2025

@codspeed-hq
Copy link

codspeed-hq bot commented May 15, 2025

CodSpeed Performance Report

Merging #5295 will not alter performance

Comparing khaleel/eng-5599-unify-generic-frontendbackend-exception-handler-api (c02e00c) with main (dc9b352)

Summary

✅ 8 untouched benchmarks

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both frontend and backend exception handlers need to be able to be specified as EventSpec/EventHandler

if isinstance(frontend_exception_handler, EventActionsMixin) and callable(
frontend_exception_handler
):
return frontend_exception_handler(stack)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we want to avoid the extra round trip to the client for processing this.

is it possible to do something like

await app.event_namespace.on_event(
    sid=self.router.session.session_id,
    data=fix_events(
        events=[frontend_exception_handler(stack)],
        token=self.router.session.client_token,
        router_data=self.router_data,
    )[0],
)

i guess maybe that would have a dead locking issue because the state is already being processed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe? i couldn't understand exactly how the flow is going and how to make it do that, which is why i couldn't figure out the backend exception and why this one is a draft

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

Successfully merging this pull request may close these issues.

3 participants