Skip to content

Conversation

@jurij-jukic
Copy link

@jurij-jukic jurij-jukic commented Oct 7, 2025

  • - hyperprocess-macro/src/lib.rs:1076 uses unreachable! for unexpected enum variants; any deserialization drift between request variants and handlers will crash the component instead of logging and rejecting the request.
  • - hyperprocess-macro/src/lib.rs:1120-1135 serializes handler results with serde_json::to_vec(...).unwrap() and then calls resp.send().unwrap(); any serialization failure or send error will panic rather than surfacing an error back to the caller. --> error cannot be triggered unless custom serialization logic is used. No fix needed. Similar situation in other serde unwraps.

@jurij-jukic jurij-jukic requested a review from nick1udwig October 7, 2025 12:39
Copy link
Member

@nick1udwig nick1udwig left a comment

Choose a reason for hiding this comment

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

lgtm

in #38 you note other bad places. Would you prefer to address those here or in another PR?

@jurij-jukic
Copy link
Author

jurij-jukic commented Oct 30, 2025

process_lib/src/hyperapp.rs:280 and process_lib/src/hyperapp.rs:305 assume every non-success payload is a SendError, panicking on corrupt or unexpected responses instead of bubbling a decode failure.

This one is not explicitly addressed. This is outdated. Errors are surfaced cleanly in send and send_rmp, there are no panics.

@jurij-jukic jurij-jukic merged commit 3f21349 into develop Oct 30, 2025
@jurij-jukic jurij-jukic deleted the j/prevent-crashing branch October 30, 2025 11:34
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