Comments (2)
Another option is to define some APIError event types for internal use, allow any machine's process()
function to emit them, and have do_api()
collect those just like it currently collects API Actions. But if it sees any error events, then do_api()
returns an Err
instead of an Ok
. So do_api() -> Result<Actions, WormholeCoreError>
, but none of the other machines' process()
functions would return a Result. So the core would signal errors synchronously, which the API layer could then map into the approach of their choosing.
This would make it easier for e.g. Code::SetCode(code)
to signal an error when the code is malformed. The main sticking point is to make sure that we haven't moved any other state machines in an irreversible way (although to be honest the Python code isn't very clear about how fatal errors are: if you make a mistake and submit a malformed code, then is the wormhole now permanently corrupted, or can you recover by trying again?).
from magic-wormhole.rs.
As of #94, all programmer related errors are eliminated at compile time by the type system. core
sends any errors it has over the channel as APIEvent::GotError
. The public API exposes this as a stream of Result<message type, error type>
.
from magic-wormhole.rs.
Related Issues (20)
- Detect broken TCP connection to peer HOT 1
- Port forwarding crashes HOT 4
- AddrNotAvailable error for IPv4 on Windows HOT 1
- RUSTSEC-2022-0048: xml-rs is Unmaintained HOT 1
- Using tcp relay with tcp:hostname syntax will panic
- Feature Request: cli installable using cargo-install HOT 2
- feature request: support ssh invite/ssh accept modes HOT 5
- Add function to get claimed nameplates
- Flaky tests
- rand >= 0.8 break WASM support HOT 3
- Feature suggestion: show bitrate in progress bar HOT 5
- Progress bar bitrate intermittently drops on the sending side HOT 10
- `send --code` does not verify that a nameplate was provided and uses the entire code as the nameplate instead HOT 2
- RUSTSEC-2023-0037: crate has been renamed to `crypto_secretbox` HOT 1
- Release mac binaries HOT 1
- RUSTSEC-2023-0052: webpki: CPU denial of service in certificate path building
- [Feature request] Drop xsalsa20poly1305 dependency HOT 3
- Adapt help message for renamed binary
- Windows binary for v0.6.1 HOT 2
- Enable transfers over link scoped addresses
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magic-wormhole.rs.