holochain / holochain/android-service-runtime
Holochain runtime errors should be propagated back to the IPC client via the IHolochainServiceCallback
- Dominant language
- Rust
- Stars
- 4
- Forks
- 2
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 3
Description
Ensure that holochain runtime call errors get propagated back to the caller, so they can display an error notice if desired.
The current state is:
- In the HolochainService, we call a runtime function as a kotlin coroutine, running in a separate thread
- The runtime function returns a Result (under-the-hood uniffi handles converting this into a kotlin exception https://mozilla.github.io/uniffi-rs/latest/types/errors.html)
- The coroutine panics (I think, but have not confirmed)
Instead we should:
- Define a new callback function in [`IHolochainServiceCallback.aidl`] called `runtimeException`, following the same pattern `adminBinderUnauthorizedException` and `appBinderUnauthorizedException`.
- Implement it in `IHolochainServiceCallbackStubDeferred`
- Run all our runtime calls within a try/catch block. If we catch a `RuntimeErrorFfi`, then call the `runtimeException` callback with the error message.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.