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

[FLI-861] Try to handle panics in engine #148

Open
markphelps opened this issue Feb 21, 2024 · 2 comments
Open

[FLI-861] Try to handle panics in engine #148

markphelps opened this issue Feb 21, 2024 · 2 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@markphelps
Copy link
Contributor

markphelps commented Feb 21, 2024

thread '<unnamed>' panicked at flipt-engine-ffi/src/lib.rs:212:79:

Thank you @markphelps, that helps to understand the issue better. That unwrap could panic in many cases if there is an connection or configuration issue. It would be great if initialize_engine could return an error to upstream instead of panic. Don't know if that is possible with FFI.

Yeah agreed. We should see if we can recover from panic in FFI/Flipt Evaluation layer and always return an error instead of crashing the client. Will create an issue for this in the flipt-client-sdk repo

Originally posted by @markphelps in flipt-io/flipt#2791 (comment)

FLI-861

@markphelps markphelps changed the title Try to handle panics in engine [FLI-861] Try to handle panics in engine Feb 21, 2024
@markphelps markphelps added the good first issue Good for newcomers label Feb 21, 2024
@markphelps
Copy link
Contributor Author

This from the stdlib may be helpful per the Rust FFI docs: https://doc.rust-lang.org/nomicon/ffi.html#catching-panic-preemptively

@reinainblood
Copy link

@markphelps i'd like to take a stab at this one, could you assign it to me please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

2 participants