Conversation
Coverage Report for CI Build 24466338993Coverage decreased (-0.06%) to 84.276%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
benalleng
left a comment
There was a problem hiding this comment.
I would really prefer we not use ..Issue as the naming convention in the case of preventing Dart Exception classes, lets use PayloadFailure, RequestFailure, SessionFailure instead
I see, just merged a PR in uniffi-dart upstream to fix the Dart failures, should help with future error name issues, and can use the better names. I'm thinking of renaming it back to the original |
71f2fda to
452c379
Compare
452c379 to
4f8aae4
Compare
Add stable kind accessors for receiver protocol, payload,\nrequest, and session errors in the core crate and surface\nmatching snapshot objects over UniFFI.\n\nBindings could previously only tell that a receiver protocol\nerror happened, not whether the failure came from the original\npayload, the v1 HTTP request, or the v2 session machinery.\nThat made cross-language integrations parse display strings or\ntreat actionable failures as opaque.\n\nThe new accessors preserve the existing display behavior while\nmaking the branchable error shape available to Rust and FFI\ncallers. Focused tests cover the core accessors and the FFI\nmapping for payload and request failures.
Point the Dart generator dependency at the merged upstream fix\nfor object types ending in Error.\n\nThis replaces the temporary downstream workaround path with the\nupstream uniffi-dart revision that contains the naming fix, so the\nreceiver bindings can keep their original Error names.
Refresh the minimal and recent lockfiles after upgrading\nuniffi-dart to the upstream revision with the Dart naming fix.\n\nThis keeps the branch's resolved dependency graph aligned with the\nCargo.toml change used by CI and local testing.
4f8aae4 to
5ddaa5a
Compare
spacebear21
left a comment
There was a problem hiding this comment.
concept NACK, these errors are explicitly marked Internal in the core library because this level of detail is unnecessary for implementers, and keeping them opaque lets us modify the internal variants without breaking API changes.
Closes #1270.
This PR exposes the receiver protocol error structure that already existed in core but was being flattened at the FFI boundary. Before this change, bindings could tell that a receiver protocol error happened, but they could not reliably distinguish malformed original payloads, malformed v1 requests, and v2 session failures, or inspect the details that matter for control flow.
The change adds stable classifications for protocol, payload, request, and session errors, along with targeted detail accessors for the fields that are operationally useful now, such as supported versions, header name, invalid content type, and expected versus actual content length. The FFI continues to use stable object wrappers rather than freezing every internal Rust enum variant directly into the cross-language API.
The result is that bindings can now branch on receiver failures in a structured way instead of scraping display strings. That gives downstream integrations a usable receiver-side error contract and sets the pattern for the remaining receiver error work.